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

'<' is not encoded when convert markdown to html #3257

Closed
cnblogs-dudu opened this issue Nov 26, 2016 · 2 comments
Closed

'<' is not encoded when convert markdown to html #3257

cnblogs-dudu opened this issue Nov 26, 2016 · 2 comments

Comments

@cnblogs-dudu
Copy link

cnblogs-dudu commented Nov 26, 2016

Use command line: pandoc -f markdown_github -t html
Input markdown text: https://gist.github.com/cnblogs-dudu/c9fde76518998e5386f6e66bd89b281a
screen shot 2016-11-26 at 17 32 39
Get the following html when use pandoc 1.17.2 or pandoc 1.18.

<p>i(i<j)

```javascript
function binarySearch1(a, target) {
  while(start <= end) {
    var mid = ~~((start + end) >&gt; 1);<br />
}<br />
}<br />
```</p>

Expect the following right html. It works on pandoc 1.17.

<p>i(i&lt;j)</p>
<div class="sourceCode"><pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="kw">function</span> <span class="at">binarySearch1</span>(a<span class="op">,</span> target) <span class="op">{</span>
  <span class="cf">while</span>(start <span class="op">&lt;=</span> end) <span class="op">{</span>
    <span class="kw">var</span> mid <span class="op">=</span> <span class="op">~~</span>((start <span class="op">+</span> end) <span class="op">&gt;&gt;</span> <span class="dv">1</span>)<span class="op">;</span>    
  <span class="op">}</span>
<span class="op">}</span></code></pre></div>
@jgm
Copy link
Owner

jgm commented Nov 26, 2016 via email

@jgm
Copy link
Owner

jgm commented Nov 26, 2016 via email

@jgm jgm added this to the pandoc 2.0 milestone Mar 18, 2017
@jgm jgm closed this as completed in 87f99f3 Mar 18, 2017
jgm added a commit that referenced this issue Mar 21, 2017
This also affects the Markdown reader.

Closes #3257.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants