Pike is a dynamic programming language with a syntax similar to Java and C. It is simple to learn, does not require long compilation passes and has powerful built-in data types allowing simple and really fast data manipulation.
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'>
<head></head>
</code></pre>
<head></head><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'>
<head></head>
</code></pre>
<p>Some text post code fence</p>
Bug reported here since it's impossible to bug report at https://git.lysator.liu.se/pikelang/pike/-/issues (WTF)
The following code
generates the following output:
But this is what's expected: