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

Less than character in heading of a input Markdown file with some html mixed in not detecting end of heading #2469

Closed
samogami opened this issue Oct 21, 2015 · 6 comments
Labels

Comments

@samogami
Copy link

Less than (<) character in heading of a input Markdown file with some html mixed in html not dectecting end of heading correctly.

Example input (in markdown):

# Door width for wheelchair access should be greater than 32 inches  (<813mm)

It is known that most modern wheelchairs are 24 inches to 27 inches wide from one wheel to the other wheel.

<script type="text/javascript" src="utils.js"></script>

Pandoc converts the entire text and appends an h1 at end of document

See pandoc.org/try webpage page for example of problem.

Other markdown converters work correctly as in github (see example below):

Door width for wheelchair access should be greater than 32 inches (<813mm)

It is known that most modern wheelchairs are 24 inches to 27 inches wide from one wheel to the other wheel. To enable wheelchairs to move freely through doors, the door width for wheelchair access should be not less than 32 inches / 813mm.

<script type="text/javascript" src="utils.js"></script>
@jgm
Copy link
Owner

jgm commented Oct 21, 2015

What version of pandoc are you using? I get

<h1 id="door-width-for-wheelchair-access-should-be-greater-than-32-inches-813mm">Door width for wheelchair access should be greater than 32 inches (&lt;813mm)</h1>
<p>It is known that most modern wheelchairs are 24 inches to 27 inches wide from one wheel to the other wheel.</p>
<script type="text/javascript" src="utils.js"></script>

+++ Sam Ogami [Oct 21 15 11:58 ]:

Less than (<) character in heading of a input Markdown file with some html mixed in html not dectecting end of heading correctly.

Example input (in markdown):

# Door width for wheelchair access should be greater than 32 inches  (<813mm)

It is known that most modern wheelchairs are 24 inches to 27 inches wide from one wheel to the other wheel.

<script type="text/javascript" src="utils.js"></script>

Pandoc converts the entire text and appends an h1 at end of document

See pandoc.org/try webpage page for example of problem.

Other markdown converters work correctly as in github (see example below):

Door width for wheelchair access should be greater than 32 inches (<813mm)

It is known that most modern wheelchairs are 24 inches to 27 inches wide from one wheel to the other wheel. To enable wheelchairs to move freely through doors, the door width for wheelchair access should be not less than 32 inches / 813mm.

<script type="text/javascript" src="utils.js"></script>

Reply to this email directly or view it on GitHub:
#2469

@samogami
Copy link
Author

I am using:
Windows 7
Pandoc 1.15.1.1

PS C:\Users\ogamisam> pandoc -v
pandoc.exe 1.15.1.1
Compiled with texmath 0.8.4, highlighting-kate 0.6.
Syntax highlighting is supported for the following languages:
    abc, actionscript, ada, agda, apache, asn1, asp, awk, bash, bibtex, boo, c,
    changelog, clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css,
    curry, d, diff, djangotemplate, dockerfile, dot, doxygen, doxygenlua, dtd,
    eiffel, email, erlang, fasm, fortran, fsharp, gcc, glsl, gnuassembler, go,
    haskell, haxe, html, idris, ini, isocpp, java, javadoc, javascript, json,
    jsp, julia, kotlin, latex, lex, lilypond, literatecurry, literatehaskell,
    lua, m4, makefile, mandoc, markdown, mathematica, matlab, maxima, mediawiki,
    metafont, mips, modelines, modula2, modula3, monobasic, nasm, noweb,
    objectivec, objectivecpp, ocaml, octave, opencl, pascal, perl, php, pike,
    postscript, prolog, pure, python, r, relaxng, relaxngcompact, rest, rhtml,
    roff, ruby, rust, scala, scheme, sci, sed, sgml, sql, sqlmysql,
    sqlpostgresql, tcl, tcsh, texinfo, verilog, vhdl, xml, xorg, xslt, xul,
    yacc, yaml, zsh
Default user data directory: C:\Users\ogamisam\AppData\Roaming\pandoc
Copyright (C) 2006-2015 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

@jgm
Copy link
Owner

jgm commented Oct 21, 2015

Ah, I see. The problem only arises if you do -f markdown_github
or -f markdown_strict. It does not arise with -f markdown (pandoc markdown). Not sure why this would be,
but it should help to diagnose the problem.

@jgm jgm added the bug label Oct 21, 2015
@jgm
Copy link
Owner

jgm commented Oct 23, 2015

More minimal case:

<

a>

With -f markdown_github or -f markdown-markdown_in_html_blocks, this yields

<p><

a></p>

@jgm jgm closed this as completed in a7150bb Oct 23, 2015
@samogami
Copy link
Author

When will the next build of the windows installer be created with this fix?

@jgm
Copy link
Owner

jgm commented Oct 23, 2015

Next release. I don't know when. For now you can just
backslash-escape the offending backslash.

+++ Sam Ogami [Oct 23 15 10:49 ]:

When will the next build of the windows installer be created with this
fix?


Reply to this email directly or [1]view it on GitHub.

References

  1. Less than character in heading of a input Markdown file with some html mixed in not detecting end of heading #2469 (comment)

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

No branches or pull requests

2 participants