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

pp chokes on unclosed delimited code block at end of file

bpj opened this issue · comments

I ran into a very strange bug.

To reproduce it create a file containing just

~~~~

or

````

and run pp on that file. I get this message:

pp: Unexpected end of file in foo.md
An argument of the macro "" may not be correctly delimited.

There can be anything before that fence and anything after it except a closing fence!

Sorry for the late reply... Please keep in mind that pp is not supported anymore, it's hard to deploy. For new projects I suggest ypp which is is based on a Lua interpreter and way easier to compile and install and binaries are easier to produce (thanks to zig) and deploy (see hey).

ypp uses Lua functions. String arguments can be long strings:

@foo [===[
...
]===]

With an non terminated long string, ypp won't crash but will leave the macro unevaluated in the output document.