From 94fca8874c720ebdd5d18494094cf3048d575394 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Tue, 15 Aug 2023 15:59:52 +0100 Subject: Add ability to enable or disable html checkbox checkability --- tests/gfm_task_list_item.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/gfm_task_list_item.rs b/tests/gfm_task_list_item.rs index 8b3f066..b65681d 100644 --- a/tests/gfm_task_list_item.rs +++ b/tests/gfm_task_list_item.rs @@ -2,7 +2,7 @@ use markdown::{ mdast::{Emphasis, List, ListItem, Node, Paragraph, Root, Text}, to_html, to_html_with_options, to_mdast, unist::Position, - Options, ParseOptions, + CompileOptions, Options, ParseOptions, }; use pretty_assertions::assert_eq; @@ -26,6 +26,21 @@ fn gfm_task_list_item() -> Result<(), String> { "should support unchecked task list item checks" ); + assert_eq!( + to_html_with_options( + "* [x] y.", + &Options { + parse: ParseOptions::gfm(), + compile: CompileOptions { + gfm_task_list_item_checkable: true, + ..CompileOptions::gfm() + } + } + )?, + "", + "should support option for enabled (checkable) task list item checks" + ); + assert_eq!( to_html_with_options("*\n [x]", &Options::gfm())?, "", -- cgit