From 62e14233cd52f372e0ebb4897857b35864425063 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 20 Jan 2023 09:53:33 -0800 Subject: [PATCH] HTML writer: don't disable checkboxes in task lists. Closes #8562. --- src/Text/Pandoc/Writers/HTML.hs | 2 +- test/command/tasklist.md | 27 +++++++++++++-------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index f99166f22..3af53408b 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -497,7 +497,7 @@ listItemToHtml opts bls let checkbox = if checked then checkbox' ! A.checked "" else checkbox' - checkbox' = H.input ! A.type_ "checkbox" ! A.disabled "" + checkbox' = H.input ! A.type_ "checkbox" isContents <- inlineListToHtml opts is bsContents <- blockListToHtml opts bs return $ constr (checkbox >> isContents) >> bsContents diff --git a/test/command/tasklist.md b/test/command/tasklist.md index 70fe8e13e..65afe8a9c 100644 --- a/test/command/tasklist.md +++ b/test/command/tasklist.md @@ -6,8 +6,8 @@ tests adapted from - [x] bar ^D ``` @@ -20,12 +20,11 @@ tests adapted from - [ ] bim ^D
    -
  • foo
      -
    • bar
    • -
    • baz
    • +
    • foo
        +
      • bar
      • +
      • baz
    • -
    • bim
    • +
    • bim
    ``` @@ -53,21 +52,21 @@ paragraph - [x] checked ^D
      -
    • unchecked
    • +
    • unchecked
    • plain item
    • -
    • checked
    • +
    • checked

    paragraph

      -
    1. ordered unchecked
    2. +
    3. ordered unchecked
    4. [] plain item
    5. -
    6. ordered checked
    7. +
    8. ordered checked

    paragraph

      -
    • list item with -a

      second paragraph

    • -
    • checked

    • +
    • list item with a

      second +paragraph

    • +
    • checked

    ```