Edgewall Software
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

     
    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 (0)

Change History (1)

comment:1 by Christopher Lenz, 20 years ago

Resolution: fixed
Status: newclosed

Added in [1308]. Thanks!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.