CDSoft / pp

PP - Generic preprocessor (with pandoc in mind) - macros, literate programming, diagrams, scripts...

Home Page:http://cdelord.fr/pp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question !def

wlemkows opened this issue · comments

I am using pp to process md files.
In my markdown I am using multiple !def one under another like that:
!def{X}{Y}{Z}
!def{A}{B}{C}
...
...

After pp processing this file, in place of line with !def I receive multiple empty lines.
Is it intended? How to prevent that?

The end of line that follows a macro is not part of the macro and is kept in the output.
To prevent this you can use:

  • the quiet macro to discard empty lines (only one remains):

    !quiet
    ~~~~~~~~~~~~~
    !def{X}{Y}{Z}
    !def{A}{B}{C}
    ...
    ...
    ~~~~~~~~~~~~~

  • the import macro or -import command line option to load definitions from an other file. The command line option may be a better solution since no empty lines will be produced.

That exactly what I need, thanks .