-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
New markdown to asciidoc tests #5716
base: main
Are you sure you want to change the base?
Conversation
Hm.. asciidoc lists are interesting... btw. what's the difference between |
|
||
``` | ||
% pandoc -t asciidoc | ||
## Title |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this read "### Title
" ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe :) We should probably implement #5615
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm, beside the discussion in #5615, the comment for this test case (line 45 "Render a level 3 heading") does not match the actual test data in lines 49 to 51, as it is just a level 2 heading (which is tested also in lines 24 .. 31 above).
% pandoc -t asciidoc | ||
## Title | ||
^D | ||
== Title |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and accordingly "=== Title
" here?
Decimal says "I definitely want a decimal list number." DefaultStyle says "use whatever is the default for this list level in this output format" (e.g. in LaTeX, just give me an unadorned |
About the heading levels... I think I let myself be confused by #5615 (which seems more about how we should handle heading levels in the markdown input). From asciidoctor docs:
@cagix I guess you were right and I assume that's how it's always worked in asciidoc (not just asciidoctor) and these test by @bodiam are just not correct? The correct equivalences would be:
|
@mb21 following the discussion in #5615, it seems to me, that the new |
@cagix yes, |
Pandoc renders level-1 headers into asciidoc as |
then all tests regarding headings are currently wrong and this is the intended behaviour:
and
? |
I would like to contribute to this code |
I've written a script (not included) and transformed the tests from https://github.com/bodiam/markdown-to-asciidoc/tree/master/src/test/resources/nl/jworks/markdown_to_asciidoc to our test format.
There are also another two files in that repo we could look at named
testsuite.[adoc|md]
: https://github.com/bodiam/markdown-to-asciidoc/tree/master/src/test/resourcesTo execute only the new tests:
After fixing quite a few tests manually (insignificant changes like word-wrapping), we are at:
Those are somewhat interesting cases where I'm not sure whether pandoc is wrong or the test is wrong.
Also a few places where it should be possible to improve pandoc to output nicer asciidoc. I'll see whether I get to that as well...