Unified · Split
| @@ -92,15 +92,6 @@ BEGIN { · 91 unmodified lines | |||
| 92 | $0 = $0 "</tr>"; | 92 | $0 = $0 "</tr>"; |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | # Code blocks | ||
| 96 | /^( | )/ { | ||
| 97 | if(block != "code") | ||
| 98 | newblock("code"); | ||
| 99 | sub(/^( | )/, ""); | ||
| 100 | text = text $0 "\n"; | ||
| 101 | next; | ||
| 102 | } | ||
| 103 | |||
| 104 | # Paragraph | 95 | # Paragraph |
| 105 | /^$/{ | 96 | /^$/{ |
| 106 | newblock(); | 97 | newblock(); |
| @@ -127,7 +118,20 @@ BEGIN { · 20 unmodified lines | |||
| 127 | } | 118 | } |
| 128 | sub(/^([*+-]|(([0-9]+[\.-]?)+))[ ]/,""); | 119 | sub(/^([*+-]|(([0-9]+[\.-]?)+))[ ]/,""); |
| 129 | } | 120 | } |
| 130 | nl > 0 { sub("^( ? ?| )","");} | 121 | { |
| 122 | for(i = 0; i < nl; i++) | ||
| 123 | sub("^( ? ?| )",""); | ||
| 124 | } | ||
| 125 | /^$/ { text = "<p>" text "</p>"; | ||
| 126 | |||
| 127 | # Code blocks | ||
| 128 | /^( | )/ && block != "li" { | ||
| 129 | if(block != "code") | ||
| 130 | newblock("code"); | ||
| 131 | sub(/^( | )/, ""); | ||
| 132 | text = text $0 "\n"; | ||
| 133 | next; | ||
| 134 | } | ||
| 131 | 135 | ||
| 132 | # Setex-style Headers | 136 | # Setex-style Headers |
| 133 | # (Plus h3 with underscores.) | 137 | # (Plus h3 with underscores.) |