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

The parser will not recognize a nowiki block if it has a heading in it. #1

Open
epochwolf opened this issue Dec 28, 2009 · 3 comments

Comments

@epochwolf
Copy link

The parser will not recognize a nowiki block if it has a heading in it.

==Official Markup==
{{{ 
 Here is a summary of the official Creole 1.0 markup
 elements.  See http://www.wikicreole.org for the full
 details.

 Headings:
 =heading 1       ->    <h1>heading 1</h1>
 == heading 2      ->    <h2>heading 2</h2>
 ...
 ====== heading 6  ->    <h6>heading 6</h6>

 Paragraphs are separated by other blocks and blank lines.
 Inline markup can usually be combined, overlapped, etc.  List
 items and plugin text can span lines.
}}}

will result in http://www.wikicreole.org and =heading1 being parsed instead of {{{ }}}. If the headings are removed or escaped, the nowiki block is parsed.

==Official Markup==
{{{ 
 Here is a summary of the official Creole 1.0 markup
 elements.  See http://www.wikicreole.org for the full
 details.

 Headings:
 ~=heading 1       ->    <h1>heading 1</h1>
 ~== heading 2      ->    <h2>heading 2</h2>
 ...
 ~====== heading 6  ->    <h6>heading 6</h6>

 Paragraphs are separated by other blocks and blank lines.
 Inline markup can usually be combined, overlapped, etc.  List
 items and plugin text can span lines.
}}}

This results in the tildes being printed which is what's supposed to happen. I've tried tracing the parsing using the puts statements in the code but I can't figure out what is actually happening.

@epochwolf
Copy link
Author

It turns out this issue only appears when parsing strings with a different line ending than expected. This happens in a web environment.

@gmccreight
Copy link
Owner

Interesting. I see the fix in your repo, but it looks like you also need to commit the "nowiki_bug" test file.

@epochwolf
Copy link
Author

Oops, sorry about that. Commited.

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

No branches or pull requests

2 participants