Edgewall Software

Ticket #988 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

Subscript and superscript markup à la MoinMoin

Reported by: Juanma Barranquero Owned by: jonas
Priority: low Milestone: 0.9
Component: wiki system Version: devel
Severity: normal Keywords:
Cc:

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

     
    4141              r"""(?P<strike>~~)""", 
     42              r"""(?P<subscript>,,)""", 
     43              r"""(?P<superscript>\^)""", 
    4244              r"""(?P<inlinecode>!?\{\{\{(?P<inline>.*?)\}\}\})""", 
     
    102104        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>') 
    103111     
  • trac/tests/wiki-tests.txt

     
    190190</p> 
     191============================== 
     192^superscript^, ,,subscript,,, normal. 
     193------------------------------ 
     194<p> 
     195<sup>superscript</sup>, <sub>subscript</sub>, normal. 
     196</p> 

Attachments

Change History

Changed 4 years ago by cmlenz

  • status changed from new to closed
  • resolution set to fixed

Added in [1308]. Thanks!

Add/Change #988 (Subscript and superscript markup à la MoinMoin)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from jonas. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.