Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: asciidoc yaml parsing #193

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nicorikken
Copy link
Contributor

Fixes the issue as described in #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
Copy link
Contributor Author

nicorikken commented Aug 29, 2017

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.

Fixes the issue as described in hashobject#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
Copy link
Contributor Author

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

@podviaznikov
Copy link
Member

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

@podviaznikov
Copy link
Member

maybe we can include couple of tests?
And also add this test case #192 to the tests?

@allentiak
Copy link
Contributor

Hi, @nicorikken

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

@allentiak allentiak self-requested a review February 28, 2019 04:59
Copy link
Contributor

@allentiak allentiak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Just to make @podviaznikov's feedback explicit.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants