@@ -601,7 +601,7 @@ enter(CompileContext1 = #markdown_html_compile_context{events = Events, index =
601601 gfm_table_cell -> on_enter_gfm_table_cell (CompileContext1 );
602602 gfm_table_head -> on_enter_gfm_table_head (CompileContext1 );
603603 gfm_table_row -> on_enter_gfm_table_row (CompileContext1 );
604- % gfm_task_list_item_check -> on_enter_gfm_task_list_item_check(CompileContext1);
604+ gfm_task_list_item_check -> on_enter_gfm_task_list_item_check (CompileContext1 );
605605 html_flow -> on_enter_html_flow (CompileContext1 );
606606 html_text -> on_enter_html_text (CompileContext1 );
607607 image -> on_enter_image (CompileContext1 );
@@ -811,6 +811,25 @@ on_enter_gfm_table_row(CompileContext1 = #markdown_html_compile_context{}) ->
811811 CompileContext3 = markdown_html_compile_context :push (CompileContext2 , <<" <tr>" /utf8 >>),
812812 CompileContext3 .
813813
814+ % % @private
815+ -doc """
816+ Handle [`Enter`][Kind::Enter]:[`GfmTaskListItemCheck`][Name::GfmTaskListItemCheck].
817+ """ .
818+ -spec on_enter_gfm_task_list_item_check (CompileContext ) -> CompileContext when
819+ CompileContext :: markdown_html_compile_context :t ().
820+ on_enter_gfm_task_list_item_check (CompileContext1 = # markdown_html_compile_context {image_alt_inside = false }) ->
821+ CompileContext2 = markdown_html_compile_context :push (CompileContext1 , <<" <input type=\" checkbox\" " /utf8 >>),
822+ CompileContext3 =
823+ case CompileContext2 # markdown_html_compile_context .options of
824+ # markdown_compile_options {gfm_task_list_item_checkable = false } ->
825+ markdown_html_compile_context :push (CompileContext2 , <<" disabled=\"\" " /utf8 >>);
826+ _ ->
827+ CompileContext2
828+ end ,
829+ CompileContext3 ;
830+ on_enter_gfm_task_list_item_check (CompileContext1 = # markdown_html_compile_context {}) ->
831+ CompileContext1 .
832+
814833% % @private
815834-doc """
816835Handle [`Enter`][Kind::Enter]:[`HtmlFlow`][Name::HtmlFlow].
@@ -1085,8 +1104,8 @@ exit(CompileContext1 = #markdown_html_compile_context{events = Events, index = I
10851104 gfm_table_cell -> on_exit_gfm_table_cell (CompileContext1 );
10861105 gfm_table_head -> on_exit_gfm_table_head (CompileContext1 );
10871106 gfm_table_row -> on_exit_gfm_table_row (CompileContext1 );
1088- % gfm_task_list_item_check -> on_exit_gfm_task_list_item_check(CompileContext1);
1089- % gfm_task_list_item_value_checked -> on_exit_gfm_task_list_item_value_checked(CompileContext1);
1107+ gfm_task_list_item_check -> on_exit_gfm_task_list_item_check (CompileContext1 );
1108+ gfm_task_list_item_value_checked -> on_exit_gfm_task_list_item_value_checked (CompileContext1 );
10901109 hard_break_escape -> on_exit_break (CompileContext1 );
10911110 hard_break_trailing -> on_exit_break (CompileContext1 );
10921111 heading_atx -> on_exit_heading_atx (CompileContext1 );
@@ -1734,6 +1753,30 @@ on_exit_gfm_table_row__phantom_cells(CompileContext1 = #markdown_html_compile_co
17341753on_exit_gfm_table_row__phantom_cells (CompileContext , _Column , _Len ) ->
17351754 CompileContext .
17361755
1756+ % % @private
1757+ -doc """
1758+ Handle [`Exit`][Kind::Exit]:[`GfmTaskListItemCheck`][Name::GfmTaskListItemCheck].
1759+ """ .
1760+ -spec on_exit_gfm_task_list_item_check (CompileContext ) -> CompileContext when
1761+ CompileContext :: markdown_html_compile_context :t ().
1762+ on_exit_gfm_task_list_item_check (CompileContext1 = # markdown_html_compile_context {image_alt_inside = false }) ->
1763+ CompileContext2 = markdown_html_compile_context :push (CompileContext1 , <<" />" /utf8 >>),
1764+ CompileContext2 ;
1765+ on_exit_gfm_task_list_item_check (CompileContext1 = # markdown_html_compile_context {}) ->
1766+ CompileContext1 .
1767+
1768+ % % @private
1769+ -doc """
1770+ Handle [`Exit`][Kind::Exit]:[`GfmTaskListItemValueChecked`][Name::GfmTaskListItemValueChecked].
1771+ """ .
1772+ -spec on_exit_gfm_task_list_item_value_checked (CompileContext ) -> CompileContext when
1773+ CompileContext :: markdown_html_compile_context :t ().
1774+ on_exit_gfm_task_list_item_value_checked (CompileContext1 = # markdown_html_compile_context {image_alt_inside = false }) ->
1775+ CompileContext2 = markdown_html_compile_context :push (CompileContext1 , <<" checked=\"\" " /utf8 >>),
1776+ CompileContext2 ;
1777+ on_exit_gfm_task_list_item_value_checked (CompileContext1 = # markdown_html_compile_context {}) ->
1778+ CompileContext1 .
1779+
17371780% % @private
17381781-doc """
17391782Handle [`Exit`][Kind::Exit]:[`HeadingAtx`][Name::HeadingAtx].
0 commit comments