jgm / peg-markdown

An implementation of markdown in C, using a PEG grammar
Other
696 stars 140 forks source link

Every conversion output ends with a linefeed #34

Open pavel-zdenek opened 9 years ago

pavel-zdenek commented 9 years ago

We are using quite distant fork of this project, but the issue originates here. Every fork in the chain retains it unquestioned, so i dare to ask at the source. https://github.com/jgm/peg-markdown/blob/2dfff24fb877bca11efe2cf91316f4abd3ef016a/markdown_lib.c#L47 Having every markdown_to_* retval tailed with line feed is a bug in our books. If the line is removed, 9 of 22 tests fails in various strange ways. Our use cases are quite simple and fall in the 13 passing tests, but we would like to contribute an universally working improvement. No linefeed in, no linefeed out. Is it possible? It might be an indispensable parser preprocessing hack in which case we will give up and just remove the linefeeds on our end.

jgm commented 9 years ago

I'm not active maintaining this project any more (I'm focusing my efforts now on jgm/cmark), so you'll have to attack this at some downstream point.

+++ Pavel Zdeněk [Aug 05 15 09:58 ]:

We are using quite distant fork of this project, but the issue originates here. Every fork in the chain retains it unquestioned, so i dare to ask at the source. [1]https://github.com/jgm/peg-markdown/blob/2dfff24fb877bca11efe2cf9131 6f4abd3ef016a/markdown_lib.c#L47 Having every markdownto* retval tailed with line feed is a bug in our books. If the line is removed, 9 of 22 tests fails in various strange ways. Our use cases are quite simple and fall in the 13 passing tests, but we would like to contribute an universally working improvement. No linefeed in, no linefeed out. Is it possible?

— Reply to this email directly or [2]view it on GitHub.

References

  1. https://github.com/jgm/peg-markdown/blob/2dfff24fb877bca11efe2cf91316f4abd3ef016a/markdown_lib.c#L47
  2. https://github.com/jgm/peg-markdown/issues/34