Ticket #2048: 2048.patch
| File 2048.patch, 1.7 KB (added by cboos, 6 years ago) |
|---|
-
trac.css
360 360 table.listing tbody tr:hover { background: #eed !important } 361 361 362 362 /* Styles for the error page (and rst errors) */ 363 span.notice { 364 background: #fcb; 365 border: 1px dotted #d00; 366 color: #500; 367 padding: 0 0 0 .5em; 368 margin: .5em; 369 } 363 370 #content.error .message, div.system-message { 364 371 background: #fdc; 365 372 border: 2px solid #d00; -
formatter.py
44 44 SUBSCRIPT_TOKEN = ",," 45 45 SUPERSCRIPT_TOKEN = r"\^" 46 46 INLINE_TOKEN = "`" 47 NOTICE_TOKEN = r"\*\*\*" 47 48 48 49 LINK_SCHEME = r"[\w.+-]+" # as per RFC 2396 49 50 … … 144 145 r"(?P<strike>!?%s)" % STRIKE_TOKEN, 145 146 r"(?P<subscript>!?%s)" % SUBSCRIPT_TOKEN, 146 147 r"(?P<superscript>!?%s)" % SUPERSCRIPT_TOKEN, 148 r"(?P<notice>!?%s)" % NOTICE_TOKEN, 147 149 r"(?P<inlinecode>!?\{\{\{(?P<inline>.*?)\}\}\})", 148 150 r"(?P<inlinecode2>!?%s(?P<inline2>.*?)%s)" % (INLINE_TOKEN, 149 151 INLINE_TOKEN), … … 376 378 else: 377 379 return self.simple_tag_handler('<sup>', '</sup>') 378 380 381 def _notice_formatter(self, match, fullmatch): 382 print match 383 if match[0] == '!': 384 return match[1:] 385 else: 386 return self.simple_tag_handler('<span class="notice">', '</span>') 387 379 388 def _inlinecode_formatter(self, match, fullmatch): 380 389 return '<tt>%s</tt>' % fullmatch.group('inline') 381 390
