Skip to content

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

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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