HTML reader does not interpret type attribute on <ol> #2313
adunning
commented
adunning
commented
Am I missing something here? Given either of these commands:
pandoc -f markdown -t html5 << EOT | pandoc -f html -t markdown
pandoc -f markdown -t html << EOT | pandoc -f html -t markdownI would expect the following to return identical results:
1. One
2. Two
<!-- -->
I. One
II. Two
<!-- -->
i. One
ii. Two
<!-- -->
A. One
B. Two
<!-- -->
a. One
b. Two
EOTInstead, I receive the following in both cases:
1. One
2. Two
<!-- -->
1. One
2. Two
<!-- -->
1. One
2. Two
<!-- -->
1. One
2. Two
<!-- -->
1. One
2. Two
hftf
commented
Oops, should have said I started fixing this bug. FYI, I think the nearby lookup "style" code (added in e814a3f from 8 years ago) doesn't work as intended:
$ cat <<EOF > foo
<ol class="lower-roman"></ol>
<ol style="lower-roman"></ol>
<ol style="list-style: lower-roman;"></ol>
<ol style="list-style-type: lower-roman;"></ol>
EOF
$ pandoc -f html -t native foo
[OrderedList (1,LowerRoman,DefaultDelim)
[]
,OrderedList (1,LowerRoman,DefaultDelim)
[]
,OrderedList (1,DefaultStyle,DefaultDelim)
[]
,OrderedList (1,DefaultStyle,DefaultDelim)
[]]
I also had trouble running the HTML tests using only cabal test. It seems I needed to completely install pandoc before my changes were used.
Yes, the style thing is messed up. We need to look for
`list-style-type`. This may even be wrong in the tests
(`tests/html-reader.html`).
`cabal test` sometimes doesn't work for me either,
for reasons I don't understand. But you can always run
the test suite manually,
`dist/build/test-pandoc/test-pandoc`.
+++ Ophir Lifshitz [Jul 21 15 13:20 ]:
…
This was referenced
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The HTML reader does not interpret the type attribute on
<ol>(output by the HTML5 writer), as in the following case (version 1.15.0.6):This is the result: