You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you add an objective-c code block in a list using GFM, the parsers seems to interpret the - in front of the objective-c function declaration as a new list item.
With a random JavaScript code snippet this works fine
>marked("This is a list\n1. Some first item\n2. Some second item\n```js\nvar a = 'a string';\n```\n3. Some third item")'<p>This is a list</p>\n<ol>\n<li>Some first item</li>\n<li>Some second item<pre><code class="lang-js">var a = 'a string';\n</code></pre>\n</li>\n<li>Some third item</li>\n</ol>\n'
Now if add a dash in the beginning of the code snippet we'll see the misinterpretation:
>marked("This is a list\n1. Some first item\n2. Some second item\n```objc\n- (BOOL)someFun { ... }\n```\n3. Some third item")'<p>This is a list</p>\n<ol>\n<li>Some first item</li>\n<li>Some second item\n```objc</li>\n<li>(BOOL)someFun { ... }\n```</li>\n<li>Some third item</li>\n</ol>\n'
The text was updated successfully, but these errors were encountered:
$ bin/marked
This is a list
1. Some first item
2. Some second item
```objc
- (BOOL)someFun { ... }
```
3. Some third item
<p>This is a list</p>
<ol>
<li>Some first item</li>
<li>Some second item<pre><code class="lang-objc"> - (BOOL)someFun { ... }
</code></pre>
</li>
<li>Some third item</li>
</ol>
If you add an objective-c code block in a list using GFM, the parsers seems to interpret the
-
in front of the objective-c function declaration as a new list item.With a random JavaScript code snippet this works fine
Now if add a dash in the beginning of the code snippet we'll see the misinterpretation:
The text was updated successfully, but these errors were encountered: