|
140 | 140 | # Issues |
141 | 141 | while (<IN>) { |
142 | 142 | chomp; |
| 143 | + |
143 | 144 | # Don't pipe code |
144 | 145 | s/</</g; |
145 | 146 |
|
146 | | - # Issue number |
| 147 | + # Linkify URLs |
| 148 | + s/(http\S+)/<a href='\1'>\1<\/a>/g; |
| 149 | + |
| 150 | + # Anchor issue number |
147 | 151 | s/Issue (\d+)\./Issue \1. <a href='#issue-\1'>#<\/a>/; |
148 | 152 | $index = $1; |
149 | 153 |
|
150 | | - # Color coding |
151 | | - $code = ''; |
152 | | - if (/\nVerified:\s+\S+/) { |
153 | | - $code = 'a'; |
154 | | - } |
155 | | - elsif (/\n(?:Closed|Open):\s+(\S+)/) { |
156 | | - $code = $statusStyle{lc $1}; |
157 | | - } |
158 | | - if (/\nOpen/) { |
159 | | - $code .= ' ' if $code; |
160 | | - $code .= 'open'; |
| 154 | + # Color coding WG response |
| 155 | + @lines = split /\n/; |
| 156 | + foreach (@lines) { |
| 157 | + # Get Status |
| 158 | + if (/^Open/) { |
| 159 | + $status = 'open'; |
| 160 | + } |
| 161 | + # Colorize WG response |
| 162 | + if (/^(?:Closed|Open):\s+(\S+)$/) { |
| 163 | + $code = $statusStyle{lc $1}; |
| 164 | + $_ = '<span class="' . $code . '">' . $_ . '</span>'; |
| 165 | + } |
| 166 | + # Colorize commenter response |
| 167 | + elsif (/^Verified:\s+\S+$/) { |
| 168 | + $code = 'a'; |
| 169 | + $_ = '<span class="a">' . $_ . '</span>'; |
| 170 | + } |
| 171 | + else { |
| 172 | + $_ = '<span>' . $_ . '</span>'; |
| 173 | + } |
161 | 174 | } |
162 | 175 |
|
163 | 176 | # And print it |
164 | | - print OUT "<pre class='$code' id='issue-$index'>\n"; |
165 | | - s/(http\S+)/<a href='\1'>\1<\/a>/g; |
166 | | - print OUT; |
| 177 | + print OUT "<pre class='$status $code' id='issue-$index'>\n"; |
| 178 | + print OUT join "\n", @lines; |
167 | 179 | print OUT "</pre>\n"; |
168 | 180 | } |
169 | 181 |
|
@@ -195,11 +207,14 @@ sub header { |
195 | 207 | <meta charset="utf-8"> |
196 | 208 | <title>$title Disposition of Comments for $date $status</title> |
197 | 209 | <style type="text/css"> |
198 | | - .a { background: lightgreen } |
199 | | - .d { background: lightblue } |
200 | | - .r { background: orange } |
201 | | - .fo { background: red } |
202 | | - .open { border: solid red; padding: 0.2em; } |
| 210 | + pre { border: solid thin silver; padding: 0.2em; white-space: normal; } |
| 211 | + pre > span { display: block; white-space: pre; } |
| 212 | + :not(pre).a { background: lightgreen } |
| 213 | + :not(pre).d { background: lightblue } |
| 214 | + :not(pre).oi { background: yellow } |
| 215 | + :not(pre).r { background: orange } |
| 216 | + :not(pre).fo { background: red } |
| 217 | + .open { border: solid red; } |
203 | 218 | :target { box-shadow: 0.25em 0.25em 0.25em; } |
204 | 219 | </style> |
205 | 220 |
|
|
0 commit comments