git.iko.soy/typeable/pandoc
on master help sign in
Merge branch 'master' into citeproc
1bfd811John MacFarlane
src/Text/Pandoc/Readers/HTML.hs+2−2
@@ -686,8 +686,8 @@ inline = choice [ charRef
686
686
687code :: GenParser Char ParserState Inline
687code :: GenParser Char ParserState Inline
688code = try $ do
688code = try $ do
689− result <- (htmlOpenTag "code" >> manyTill anyChar (htmlEndTag "code"))
689+ result <- (htmlOpenTag "code" >> manyTill (noneOf "<>") (htmlEndTag "code"))
690− <|> (htmlOpenTag "tt" >> manyTill anyChar (htmlEndTag "tt"))
690+ <|> (htmlOpenTag "tt" >> manyTill (noneOf "<>") (htmlEndTag "tt"))
691 -- remove internal line breaks, leading and trailing space,
691 -- remove internal line breaks, leading and trailing space,
692 -- and decode character references
692 -- and decode character references
693 return $ Code $ decodeCharacterReferences $ removeLeadingTrailingSpace $
693 return $ Code $ decodeCharacterReferences $ removeLeadingTrailingSpace $
tests/html-reader.html+3−3
@@ -340,7 +340,7 @@ foo<p>This should just be an HTML comment:</p>
340<p>So is <strong><em>this</em></strong> word.</p>
340<p>So is <strong><em>this</em></strong> word.</p>
341<p><strong><em>This is strong and em.</em></strong></p>
341<p><strong><em>This is strong and em.</em></strong></p>
342<p>So is <strong><em>this</em></strong> word.</p>
342<p>So is <strong><em>this</em></strong> word.</p>
343−<p>This is code: <code>></code>, <code>$</code>, <code>\</code>, <code>\$</code>, <code>&lt;html></code>.</p>
343+<p>This is code: <code>&gt;</code>, <code>$</code>, <code>\</code>, <code>\$</code>, <code>&lt;html&gt;</code>.</p>
344<hr />
344<hr />
345<h1>Smart quotes, ellipses, dashes</h1>
345<h1>Smart quotes, ellipses, dashes</h1>
346<p>"Hello," said the spider. "'Shelob' is my name."</p>
346<p>"Hello," said the spider. "'Shelob' is my name."</p>
@@ -442,8 +442,8 @@ Email link (nobody [at] nowhere.net)<p><a href="">Empty</a>.</p>
442An e-mail address: nobody [at] nowhere.net<blockquote>
442An e-mail address: nobody [at] nowhere.net<blockquote>
443<p>Blockquoted: <a href="http://example.com/">http://example.com/</a></p>
443<p>Blockquoted: <a href="http://example.com/">http://example.com/</a></p>
444</blockquote>
444</blockquote>
445−<p>Auto-links should not occur here: <code>&lt;http://example.com/></code></p>
445+<p>Auto-links should not occur here: <code>&lt;http://example.com/&gt;</code></p>
446−<pre><code>or here: &lt;http://example.com/>
446+<pre><code>or here: &lt;http://example.com/&gt;
447</code></pre>
447</code></pre>
448<hr />
448<hr />
449<h1>Images</h1>
449<h1>Images</h1>