Skip to content

commonmark.js should first evaluate character references, before interpreting “words” of the info string #255

@wooorm

Description

@wooorm

Here are some examples:

```	js
```
``` js
```
``` js
```
```js	
```
```js 
```
```js 
```
```js	a
```
```js a
```
```js a
```

While the spec is somewhat vague, I believe that the encoded whitespace in the first two examples, should behave like spaces, which is what happens with all the other examples, and that that is the intent of the spec.
Github does treat all these examples as js, and adds their class to it. CommonMark.js currently yields:

<pre><code></code></pre>
<pre><code></code></pre>
<pre><code class="language-js"></code></pre>
<pre><code class="language-js"></code></pre>
<pre><code class="language-js"></code></pre>
<pre><code class="language-js"></code></pre>
<pre><code class="language-js"></code></pre>
<pre><code class="language-js"></code></pre>
<pre><code class="language-js"></code></pre>

I expect <pre><code class="language-js"></code></pre> for everything (like GH).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions