Modify ↓
Opened 20 years ago
Closed 20 years ago
#988 closed enhancement (fixed)
Subscript and superscript markup à la MoinMoin
Reported by: | Juanma Barranquero | Owned by: | Jonas Borgström |
---|---|---|---|
Priority: | low | Milestone: | 0.9 |
Component: | wiki system | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
A trivial implementation of superscript and subscript markup à la MoinMoin, from which TracWiki already draws heavily (and proudly :)
Included also a wiki-tests.txt patch, untested. (I asked this before, BTW, with no answer: what's the procedure to run the tests on a Windows environment?)
Anyway, the patch:
-
trac/WikiFormatter.py
41 41 r"""(?P<strike>~~)""", 42 r"""(?P<subscript>,,)""", 43 r"""(?P<superscript>\^)""", 42 44 r"""(?P<inlinecode>!?\{\{\{(?P<inline>.*?)\}\}\})""", … … 102 104 return self.simple_tag_handler('<del>', '</del>') 105 106 def _subscript_formatter(self, match, fullmatch): 107 return self.simple_tag_handler('<sub>', '</sub>') 108 109 def _superscript_formatter(self, match, fullmatch): 110 return self.simple_tag_handler('<sup>', '</sup>') 103 111 -
trac/tests/wiki-tests.txt
190 190 </p> 191 ============================== 192 ^superscript^, ,,subscript,,, normal. 193 ------------------------------ 194 <p> 195 <sup>superscript</sup>, <sub>subscript</sub>, normal. 196 </p>
Attachments (0)
Note:
See TracTickets
for help on using tickets.
Added in [1308]. Thanks!