Closed dishmint closed 1 year ago
The \\s{2} could be a problem if people use different indentation-lengths.
\\s{2}
(* OrderedListItems *) RegularExpression[ "^((\\s{2}|\\t)*)((\\d\\.)+\\d?)\\s(.*)$" ] :> $TokenLevelData[ <| "Token" -> "OrderedListItem", "Level" -> GetIndentationLevel["$1"], "Data" -> "$5" |> ]
There are three possibilities: (1) set the indentation-length with an option, (2) set the indentation-length per flavor, or (3) normalize all leading indentation to spaces or tabs
https://github.com/dishmint/Markdown2WL/blob/7c60e2b17cc9b9def708f8e7239637e70bd3d6b2/FaizonZaman/WLMarkdown/Kernel/TokenRules.wl#L22
I've added $MarkdownIndentationSize so this can be set if needed.
$MarkdownIndentationSize
The
\\s{2}
could be a problem if people use different indentation-lengths.There are three possibilities: (1) set the indentation-length with an option, (2) set the indentation-length per flavor, or (3) normalize all leading indentation to spaces or tabs
https://github.com/dishmint/Markdown2WL/blob/7c60e2b17cc9b9def708f8e7239637e70bd3d6b2/FaizonZaman/WLMarkdown/Kernel/TokenRules.wl#L22