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

Parser.Markdown: Bogus output when using code fences #40

Closed
poppa opened this issue Jan 4, 2023 · 2 comments
Closed

Parser.Markdown: Bogus output when using code fences #40

poppa opened this issue Jan 4, 2023 · 2 comments

Comments

@poppa
Copy link
Member

poppa commented Jan 4, 2023

Bug reported here since it's impossible to bug report at https://git.lysator.liu.se/pikelang/pike/-/issues (WTF)

The following code

constant MD = #"
## Some Stuff

```html

<head></head>

```

Some text post code fence
";

int main(int argc, array(string) argv) {
  string html = Parser.Markdown.parse(MD);
  werror("%s", html);
}

generates the following output:

<h2 id="some-stuff">Some Stuff</h2>
<pre><code class='lang-html'>
&lt;head&gt;&lt;/head&gt;
</code></pre>
&lt;head&gt;&lt;/head&gt;<p>Some text post code fence</p>

But this is what's expected:

<h2 id="some-stuff">Some Stuff</h2>
<pre><code class='lang-html'>
&lt;head&gt;&lt;/head&gt;
</code></pre>
<p>Some text post code fence</p>
@grubba
Copy link
Member

grubba commented Jan 4, 2023

@grubba
Copy link
Member

grubba commented Apr 7, 2023

Fixed.

@grubba grubba closed this as completed Apr 7, 2023
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