tbfisher/sublimetext-Pandoc

pandoc run via ST3 sublimetext-Pandoc failes to convert fancy lists correctly

Closed this issue · 1 comments

According to Pandoc docs, fancy lists are supported:

Extension: fancy_lists

Unlike standard Markdown, pandoc allows ordered list items to be marked with uppercase and lowercase letters and roman numerals, in addition to Arabic numerals. List markers may be enclosed in parentheses or followed by a single right-parentheses or period. They must be separated from the text that follows by at least one space, and, if the list marker is a capital letter with a period, by at least two spaces.

Using latest pandoc version pandoc-2.9.1.1-windows-x86_64.msi on Windows 10, ST3 v3.2.2 build 3211

My ST3 Pandoc is configured thus:

      "HTML 5": {
        "new-buffer": 1,
        "scope": {
          "text.html.markdown": "markdown+blank_before_blockquote+fenced_code_blocks+backtick_code_blocks+line_blocks+fancy_lists+startnum+definition_lists+example_lists+table_captions+simple_tables+multiline_tables+pipe_tables+raw_html"
        },
        "syntax_file": "Packages/HTML/HTML.tmLanguage",
        "pandoc-arguments": [
          "--to=html5",
          "--no-highlight",
          ==
          "--tab-stop=2"
        ]
      },

Trying to convert to HTML this markdown:

1.  Ordinal list item
	A.  Uppercase list item
		1)  Ordinal parenthesize list item
		1)  Ordinal parenthesize list item
1.  Ordinal list item
	A.  Uppercase list item
		1)  Ordinal parenthesize list item
	A.  Uppercase list item
		1)  Ordinal parenthesize list item

Produces this output:

<ol type="1">
<li>Ordinal list item A. Uppercase list item
<ol type="1">
<li>Ordinal parenthesize list item</li>
<li>Ordinal parenthesize list item</li>
</ol></li>
<li>Ordinal list item A. Uppercase list item
<ol type="1">
<li>Ordinal parenthesize list item A. Uppercase list item</li>
<li>Ordinal parenthesize list item</li>
</ol></li>
</ol>

It should produce this:

<ol type="1">
<li>Ordinal list item
<ol type="A">
<li>Uppercase list item
<ol type="1">
<li>Ordinal parenthesize list item</li>
<li>Ordinal parenthesize list item</li>
</ol></li>
</ol></li>
<li>Ordinal list item
<ol type="A">
<li>Uppercase list item
<ol type="1">
<li>Ordinal parenthesize list item</li>
</ol></li>
<li>Uppercase list item
<ol type="1">
<li>Ordinal parenthesize list item</li>
</ol></li>
</ol></li>
</ol>

Parsing problems shouldn't be caused by this plugin, as the only thing it does is compile the correct command and run that. Sublime's console should show which command is run. Have you tried running that yourself?