perun icon indicating copy to clipboard operation
perun copied to clipboard

fix: asciidoc yaml parsing

Open nicorikken opened this issue 6 years ago • 5 comments

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 avatar Aug 28 '17 18:08 nicorikken

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 avatar Aug 29 '17 07:08 nicorikken

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

nicorikken avatar Sep 01 '17 16:09 nicorikken

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

podviaznikov avatar Nov 14 '17 06:11 podviaznikov

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

podviaznikov avatar Nov 14 '17 06:11 podviaznikov

Hi, @nicorikken

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

allentiak avatar Feb 28 '19 04:02 allentiak