X-Git-Url: https://git.plutz.net/?p=cgilite;a=blobdiff_plain;f=markdown.awk;fp=markdown.awk;h=c42aa5ac318e544c7eb259481eb1842b33ddf895;hp=4b180ebb3df2277ca2335a5370a75d21291fd44e;hb=fc3451c360c190736b7355c318f937fe304bb3c4;hpb=882284387895d0504592ff4f5be7d9927181b1ca
diff --git a/markdown.awk b/markdown.awk
index 4b180eb..c42aa5a 100755
--- a/markdown.awk
+++ b/markdown.awk
@@ -690,12 +690,22 @@ function _block( block, LOCAL, st, len, text, title, attrib, href, guard, code,
list = substr( block, 1, RLENGTH); block = substr( block, RLENGTH + 1);
return "\n
\n" _dlist( list ) "
\n" _block( block );
- # Unordered list
- } else if ( text = _startlist( block, "ul", "[-+*]", "([0-9]+\\.|#\\.)") ) {
+ # Unordered list types
+ } else if ( text = _startlist( block, "ul", "-", "([+*]|[0-9]+\\.|#\\.|[0-9]+\\)|#\\))") ) {
+ return text;
+ } else if ( text = _startlist( block, "ul", "\\+", "([-*]|[0-9]+\\.|#\\.|[0-9]+\\)|#\\))") ) {
+ return text;
+ } else if ( text = _startlist( block, "ul", "\\*", "([-+]|[0-9]+\\.|#\\.|[0-9]+\\)|#\\))") ) {
return text;
- # Ordered list
- } else if ( text = _startlist( block, "ol", "([0-9]+\\.|#\\.)", "[-+*]") ) {
+ # Ordered list types
+ } else if ( text = _startlist( block, "ol", "[0-9]+\\.", "([-+*]|#\\.|[0-9]+\\)|#\\))") ) {
+ return text;
+ } else if ( text = _startlist( block, "ol", "[0-9]+\\)", "([-+*]|[0-9]+\\.|#\\.|#\\))") ) {
+ return text;
+ } else if ( text = _startlist( block, "ol", "#\\.", "([-+*]|[0-9]+\\.|[0-9]+\\)|#\\))") ) {
+ return text;
+ } else if ( text = _startlist( block, "ol", "#\\)", "([-+*]|[0-9]+\\.|#\\.|[0-9]+\\))") ) {
return text;
# Split paragraphs