Shared.taskListItemToAscii: handle asciidoctor's characters.
Asciidoctor uses different unicode characters for task lists; we should recognize them too and be able to convert them to ascii task lists in formats like gfm. Closes #8011.
This commit is contained in:
parent
7fb74b74df
commit
813f3d5dd4
2 changed files with 17 additions and 0 deletions
|
@ -682,6 +682,8 @@ taskListItemToAscii = handleTaskListItem toMd
|
|||
where
|
||||
toMd (Str "☐" : Space : is) = rawMd "[ ]" : Space : is
|
||||
toMd (Str "☒" : Space : is) = rawMd "[x]" : Space : is
|
||||
toMd (Str "❏" : Space : is) = rawMd "[ ]" : Space : is
|
||||
toMd (Str "✓" : Space : is) = rawMd "[x]" : Space : is
|
||||
toMd is = is
|
||||
rawMd = RawInline (Format "markdown")
|
||||
|
||||
|
|
15
test/command/8011.md
Normal file
15
test/command/8011.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
```
|
||||
% pandoc -f docbook -t gfm
|
||||
<itemizedlist mark="none">
|
||||
<listitem>
|
||||
<simpara>❏ a</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>✓ b</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
^D
|
||||
- [ ] a
|
||||
|
||||
- [x] b
|
||||
```
|
Loading…
Reference in a new issue