2024-02-21 16:15:27 +00:00
|
|
|
digraph blockstate {
|
|
|
|
/* rankdir=LR; */
|
|
|
|
node [shape = circle, fontsize = 18];
|
|
|
|
edge [fontsize = 18];
|
|
|
|
init [label = "", shape=none, height = .0, width = .0];
|
|
|
|
start;
|
|
|
|
emptyBlock [label = "empty block"];
|
|
|
|
nonEmptyBlock [label = "non-empty block"];
|
|
|
|
lineBreakTag [label = "line break tag"];
|
|
|
|
atLeastTwoLineBreakTags [label = ">=2 line break tags"];
|
|
|
|
emptyBlockWithAtLeastTwoPreviousLineBreakTags [label = "empty block w/ >=2 prev line break tags"];
|
|
|
|
beginListItem [label = "begin list item"];
|
|
|
|
endListItem [label = "end list item"];
|
|
|
|
listItemContent [label = "list item content"];
|
|
|
|
lineBreakTagInListItemContent [label = "line break tag in list item content"];
|
|
|
|
atLeastTwoLineBreakTagsInListItemContent [label = ">= 2 line break tags in list item content"];
|
|
|
|
preformattedStart [label = "preformatted start"];
|
|
|
|
preformattedEmptyBlock [label = "preformatted empty block"];
|
|
|
|
preformattedNonEmptyBlock [label = "preformatted non-empty block"];
|
|
|
|
preformattedLineBreak [label = "preformatted line break"];
|
|
|
|
preformattedAtLeastTwoLineBreaks [label = "preformatted >=2 line breaks"];
|
|
|
|
afterPreStartTag [label = "after <pre> start tag"];
|
|
|
|
afterPreStartTagWithLeadingWhitespace [label = "after <pre> start tag w/ leading whitespace"];
|
|
|
|
preformattedNonEmptyBlockWithTrailingWhitespace [label = "preformatted non-empty block w/ trailing whitespace"];
|
|
|
|
preformattedEmptyBlockWithLeadingWhitespace [label = "preformatted empty block w/ leading whitespace"];
|
|
|
|
|
|
|
|
init -> start;
|
|
|
|
start -> start [label = "whitespace (skip)\n<br> (skip)\n</pre>\nstart/end block"];
|
|
|
|
start -> nonEmptyBlock [label = "non-whitespace"];
|
|
|
|
start -> preformattedStart [label = "<pre> (depth = 1)"];
|
|
|
|
start -> beginListItem [label = "<li>"];
|
2024-02-28 22:55:48 +00:00
|
|
|
nonEmptyBlock -> nonEmptyBlock [label = "non-newline"];
|
2024-02-21 16:15:27 +00:00
|
|
|
nonEmptyBlock -> emptyBlock [label = "start/end block"];
|
2024-02-28 22:55:48 +00:00
|
|
|
nonEmptyBlock -> lineBreakTag [label = "<br> or \\n (append to tmp)"];
|
2024-02-21 16:15:27 +00:00
|
|
|
nonEmptyBlock -> beginListItem [label = "<li>"];
|
|
|
|
nonEmptyBlock -> endListItem [label = "</li>"];
|
|
|
|
emptyBlock -> nonEmptyBlock [label = "non-whitespace (block break)"];
|
2024-05-22 21:48:29 +00:00
|
|
|
emptyBlock -> emptyBlock [label = "whitespace (skip)\n</pre>\nstart/end block"];
|
|
|
|
emptyBlock -> lineBreakTag [label = "<br> (append to tmp, block break)"];
|
2024-02-21 16:15:27 +00:00
|
|
|
emptyBlock -> afterPreStartTag [label = "<pre> (depth = 1)"];
|
|
|
|
emptyBlock -> beginListItem [label = "<li>"];
|
|
|
|
emptyBlock -> endListItem [label = "</li>"];
|
2024-02-28 22:55:48 +00:00
|
|
|
lineBreakTag -> lineBreakTag [label = "whitespace (append to tmp)"];
|
|
|
|
lineBreakTag -> atLeastTwoLineBreakTags [label = "<br> or \\n (append to tmp)"];
|
2024-02-21 16:15:27 +00:00
|
|
|
lineBreakTag -> emptyBlock [label = "start/end block (clear tmp)"];
|
|
|
|
lineBreakTag -> nonEmptyBlock [label = "non-whitespace (emit tmp)"];
|
2024-02-28 22:55:48 +00:00
|
|
|
atLeastTwoLineBreakTags -> atLeastTwoLineBreakTags [label = "whitespace or <br> (append to tmp)"];
|
2024-02-21 16:15:27 +00:00
|
|
|
atLeastTwoLineBreakTags -> nonEmptyBlock [label = "non-whitespace (emit tmp)"];
|
|
|
|
atLeastTwoLineBreakTags -> emptyBlockWithAtLeastTwoPreviousLineBreakTags [label = "start/end block"];
|
|
|
|
emptyBlockWithAtLeastTwoPreviousLineBreakTags -> emptyBlockWithAtLeastTwoPreviousLineBreakTags [label = "whitespace (skip)\n<br>\n</pre>\nstart/end block"];
|
|
|
|
emptyBlockWithAtLeastTwoPreviousLineBreakTags -> nonEmptyBlock [label = "non-whitespace (emit tmp)"];
|
|
|
|
emptyBlockWithAtLeastTwoPreviousLineBreakTags -> afterPreStartTagWithLeadingWhitespace [label = "<pre> (depth = 1)"];
|
|
|
|
beginListItem -> beginListItem [label = "<li>\nwhitespace (skip)\n<br>\nstart/end block"];
|
|
|
|
beginListItem -> listItemContent [label = "non-whitespace"];
|
|
|
|
beginListItem -> endListItem [label = "</li>"];
|
|
|
|
beginListItem -> afterPreStartTagWithLeadingWhitespace [label = "<pre>"];
|
|
|
|
endListItem -> endListItem [label = "whitespace (skip)\n</li>"];
|
|
|
|
endListItem -> beginListItem [label = "<li> (line break)"];
|
|
|
|
endListItem -> emptyBlock [label = "start/end block"];
|
|
|
|
endListItem -> listItemContent [label = "non-whitespace (line break, indent)"];
|
|
|
|
endListItem -> lineBreakTagInListItemContent [label = "<br> (append to tmp)"];
|
|
|
|
listItemContent -> listItemContent [label = "non-whitespace"];
|
|
|
|
listItemContent -> beginListItem [label = "<li> (line break)"];
|
|
|
|
listItemContent -> lineBreakTagInListItemContent [label = "<br> (append to tmp)"];
|
|
|
|
listItemContent -> emptyBlock [label = "start/end block"];
|
|
|
|
listItemContent -> endListItem [label = "</li>"];
|
2024-02-28 22:55:48 +00:00
|
|
|
lineBreakTagInListItemContent -> lineBreakTagInListItemContent [label = "whitespace (append to tmp)"];
|
2024-02-21 16:15:27 +00:00
|
|
|
lineBreakTagInListItemContent -> emptyBlock [label = "start/end block (clear tmp)"];
|
|
|
|
lineBreakTagInListItemContent -> beginListItem [label = "<li> (emit tmp, line break)"];
|
|
|
|
lineBreakTagInListItemContent -> listItemContent [label = "non-whitespace (emit tmp)"];
|
2024-02-28 22:55:48 +00:00
|
|
|
lineBreakTagInListItemContent -> atLeastTwoLineBreakTagsInListItemContent [label = "<br> or \\n (append to tmp)"];
|
2024-02-21 16:15:27 +00:00
|
|
|
lineBreakTagInListItemContent -> endListItem [label = "</li> (clear tmp)"];
|
2024-02-28 22:55:48 +00:00
|
|
|
atLeastTwoLineBreakTagsInListItemContent -> atLeastTwoLineBreakTagsInListItemContent [label = "whitespace or <br> (append to tmp)"];
|
2024-02-21 16:15:27 +00:00
|
|
|
atLeastTwoLineBreakTagsInListItemContent -> beginListItem [label = "<li> (emit tmp, line break)"];
|
|
|
|
atLeastTwoLineBreakTagsInListItemContent -> emptyBlockWithAtLeastTwoPreviousLineBreakTags [label = "start/end block"];
|
|
|
|
atLeastTwoLineBreakTagsInListItemContent -> listItemContent [label = "non-whitespace (emit tmp)"];
|
|
|
|
atLeastTwoLineBreakTagsInListItemContent -> endListItem [label = "</li> (clear tmp)"];
|
|
|
|
afterPreStartTag -> preformattedLineBreak [label = "<br> (append to tmp, append block break to tmp)"];
|
|
|
|
afterPreStartTag -> preformattedNonEmptyBlock [label = "non \\n (block break)"];
|
|
|
|
afterPreStartTag -> preformattedEmptyBlock [label = "\\n (skip)\nstart/end block"];
|
|
|
|
preformattedLineBreak -> preformattedNonEmptyBlock [label = "non-whitespace (emit tmp)"];
|
|
|
|
preformattedLineBreak -> preformattedNonEmptyBlockWithTrailingWhitespace [label = "other whitespace (append to tmp)"];
|
|
|
|
preformattedLineBreak -> preformattedAtLeastTwoLineBreaks [label = "\\n or <br> (append to tmp)"];
|
|
|
|
preformattedAtLeastTwoLineBreaks -> preformattedAtLeastTwoLineBreaks [label = "\\n or <br> (append to tmp)"];
|
|
|
|
preformattedAtLeastTwoLineBreaks -> preformattedNonEmptyBlock [label = "non \\n or <br> (emit tmp)"];
|
|
|
|
preformattedAtLeastTwoLineBreaks -> preformattedEmptyBlockWithLeadingWhitespace [label = "start/end block"];
|
|
|
|
preformattedEmptyBlockWithLeadingWhitespace -> preformattedEmptyBlockWithLeadingWhitespace [label = "whitespace (append to tmp)\nstart/end block\n</pre> if depth>1&&tmp.count>=2 (depth - 1, remove 1 from tmp)"];
|
|
|
|
preformattedEmptyBlockWithLeadingWhitespace -> preformattedLineBreak [label = "\\n or <br> (append to tmp)"];
|
|
|
|
preformattedEmptyBlockWithLeadingWhitespace -> afterPreStartTagWithLeadingWhitespace [label = "<pre> (depth + 1)"];
|
|
|
|
preformattedEmptyBlockWithLeadingWhitespace -> preformattedEmptyBlock [label = "</pre> if depth>1&&tmp.count<2 (depth - 1, remove 1 from tmp)"];
|
|
|
|
preformattedEmptyBlockWithLeadingWhitespace -> emptyBlock [label = "</pre> if depth<=1 (clear tmp)"];
|
|
|
|
preformattedEmptyBlock -> preformattedEmptyBlock [label = "start/end block\n</pre>if depth>1 (depth - 1)"];
|
|
|
|
preformattedEmptyBlock -> afterPreStartTag [label = "<pre> (depth + 1"];
|
|
|
|
preformattedEmptyBlock -> preformattedNonEmptyBlock [label = "non-whitespace (block break)"];
|
|
|
|
preformattedEmptyBlock -> preformattedEmptyBlockWithLeadingWhitespace [label = "whitespace (append to tmp)"];
|
|
|
|
preformattedEmptyBlock -> preformattedLineBreak [label = "<br> (append to tmp)"];
|
|
|
|
preformattedNonEmptyBlock -> preformattedNonEmptyBlock [label = "non-whitespace"];
|
|
|
|
preformattedNonEmptyBlock -> preformattedLineBreak [label = "\\n or <br> (append to tmp)"];
|
|
|
|
preformattedNonEmptyBlock -> preformattedNonEmptyBlockWithTrailingWhitespace [label = "other whitespace (append to tmp)"];
|
|
|
|
preformattedNonEmptyBlock -> preformattedEmptyBlock [label = "start/end block"];
|
|
|
|
preformattedNonEmptyBlockWithTrailingWhitespace -> preformattedNonEmptyBlockWithTrailingWhitespace [label = "whitespace (append to tmp)"];
|
|
|
|
preformattedNonEmptyBlockWithTrailingWhitespace -> preformattedNonEmptyBlock [label = "non-whitespace (emit tmp)"];
|
|
|
|
preformattedNonEmptyBlockWithTrailingWhitespace -> preformattedLineBreak [label = "\\n or <br> (append to tmp)"];
|
|
|
|
preformattedNonEmptyBlockWithTrailingWhitespace -> preformattedEmptyBlockWithLeadingWhitespace [label = "start/end block (append block break to tmp)"];
|
|
|
|
afterPreStartTagWithLeadingWhitespace -> preformattedNonEmptyBlock [label = "non-whitespace (emit tmp)"];
|
|
|
|
afterPreStartTagWithLeadingWhitespace -> preformattedEmptyBlockWithLeadingWhitespace [label = "\\n (skip)\nother whitespace (append to tmp)\n<br> (append to tmp)\nstart/end block"];
|
|
|
|
preformattedStart -> preformattedStart [label = "<pre> (depth + 1)\n</pre> if depth>1 (depth - 1)\n\\n or <br> (skip)\nstart/end block"];
|
|
|
|
preformattedStart -> start [label = "</pre> if depth<=1"];
|
|
|
|
preformattedStart -> preformattedNonEmptyBlock [label = "non \\n"];
|
|
|
|
}
|