diff options
author | cel 🌸 <cel@blos.sm> | 2023-08-15 15:59:52 +0100 |
---|---|---|
committer | cel 🌸 <cel@blos.sm> | 2023-08-15 15:59:52 +0100 |
commit | 94fca8874c720ebdd5d18494094cf3048d575394 (patch) | |
tree | 7bce6dd06290aab97aa52dfb1e6b95becf8d7642 /src/to_html.rs | |
parent | 56cd834cf88a58d3429b4b75489f161d57b28eaa (diff) | |
download | markdown-rs-94fca8874c720ebdd5d18494094cf3048d575394.tar.gz markdown-rs-94fca8874c720ebdd5d18494094cf3048d575394.tar.bz2 markdown-rs-94fca8874c720ebdd5d18494094cf3048d575394.zip |
Add ability to enable or disable html checkbox checkability
Diffstat (limited to '')
-rw-r--r-- | src/to_html.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/to_html.rs b/src/to_html.rs index 1892ba1..edd397d 100644 --- a/src/to_html.rs +++ b/src/to_html.rs @@ -601,7 +601,10 @@ fn on_enter_gfm_table_row(context: &mut CompileContext) { /// Handle [`Enter`][Kind::Enter]:[`GfmTaskListItemCheck`][Name::GfmTaskListItemCheck]. fn on_enter_gfm_task_list_item_check(context: &mut CompileContext) { if !context.image_alt_inside { - context.push("<input type=\"checkbox\" disabled=\"\" "); + context.push("<input type=\"checkbox\" "); + if !context.options.gfm_task_list_item_checkable { + context.push("disabled=\"\" "); + } } } |