@@ -176,12 +176,17 @@ defmodule IO.ANSI.Docs do
176176 process_code ( rest , [ line ] , indent , options )
177177 end
178178
179- defp process ( [ "```" <> _line | rest ] , text , indent , options ) do
180- process_fenced_code_block ( rest , text , indent , options , _delimiter = "```" )
179+ defp process ( [ "```mermaid" <> _line | rest ] , text , indent , options ) do
180+ write_text ( text , indent , options )
181+
182+ rest
183+ |> Enum . drop_while ( & ( & 1 != "```" ) )
184+ |> Enum . drop ( 1 )
185+ |> process ( [ ] , indent , options )
181186 end
182187
183- defp process ( [ "~~~ " <> _line | rest ] , text , indent , options ) do
184- process_fenced_code_block ( rest , text , indent , options , _delimiter = "~~~ " )
188+ defp process ( [ "``` " <> _line | rest ] , text , indent , options ) do
189+ process_fenced_code_block ( rest , text , indent , options , _delimiter = "``` " )
185190 end
186191
187192 defp process ( [ "<!--" <> line | rest ] , text , indent , options ) do
@@ -388,7 +393,7 @@ defmodule IO.ANSI.Docs do
388393 end
389394
390395 defp process_fenced_code ( [ line | rest ] , code , indent , options , delimiter ) do
391- if line === delimiter do
396+ if line == delimiter do
392397 process_code ( rest , code , indent , options )
393398 else
394399 process_fenced_code ( rest , [ line | code ] , indent , options , delimiter )
0 commit comments