hashobject / perun

Programmable static site generator built with Clojure and Boot (HELP NEEDED!)
https://perun.io
Eclipse Public License 1.0
350 stars 38 forks source link

fix: asciidoc yaml parsing #193

Open nicorikken opened 7 years ago

nicorikken commented 7 years ago

Fixes the issue as described in https://github.com/hashobject/perun/issues/192 by checking the triple dash to be prefixed by either the start of the document, or the start of a new line. This does still allow for some content before the actual yaml.

nicorikken commented 7 years ago

I just changed the PR to use lookbehind rather than a match, as the match could not cope with a the two yaml-head's coming right after each other. Both yaml-head's were wanting to consume the single newline inbetween. The backtracking solves this issue.

nicorikken commented 7 years ago

Again I just changed the PR, as I made a typo in the lookbehind syntax, causing false matches.

podviaznikov commented 6 years ago

this will be tricky one. We need to test this somehow. High risk it might break people's sites.

podviaznikov commented 6 years ago

maybe we can include couple of tests? And also add this test case https://github.com/hashobject/perun/issues/192 to the tests?

allentiak commented 5 years ago

Hi, @nicorikken

Still working on this? Any news regarding @podviaznikov's suggestion?