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

HTML reader and HTML writer out of sync on tasks #9047

Closed
RobTrew opened this issue Sep 1, 2023 · 1 comment
Closed

HTML reader and HTML writer out of sync on tasks #9047

RobTrew opened this issue Sep 1, 2023 · 1 comment

Comments

@RobTrew
Copy link

RobTrew commented Sep 1, 2023

Problem

In the case of task list items, the HTML reader fails to parse the output of the HTML writer.

- [ ] and - [x] prefixes are read from markdown to native:

  • [Plain [Str "\9744", Space ...
  • [Plain [Str "\9746", Space ...

respectively.

The HTML writer renders these successfully in the pattern:

<li><label><input type="checkbox" />an unchecked item</label></li>
<li><label><input type="checkbox" checked="" />a checked

but the HTML reader fails to recognise that <label> pattern, and loses the task status, interpreting such lines as plain unadorned <li>.

For an HTML -> Native -> Markdown return to - [ ] and - [x] the HTML reader only recognises direct use of the Unicode Ballot Box and Ballot Box with X pattern:

<li>&#9744; an unchecked item</li>
<li>&#9746; a checked item</li>

It looks as if the HTML reader has not yet caught up with the HTML writer, and doesn't yet understand its task item output.

Pandoc version
Pandoc 3.1.6.2
macOS 13.5.1

@RobTrew RobTrew added the bug label Sep 1, 2023
@jgm
Copy link
Owner

jgm commented Sep 1, 2023

Yes, there were changes in the writer's output, and the reader should be updated to interpret this.

sspeaks added a commit to sspeaks/pandoc that referenced this issue Sep 7, 2023
Fixed an issue specified by bug found at jgm#9047
@jgm jgm closed this as completed in 0d27947 Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants