Changes between Version 12 and Version 13 of MediaWikiPluginMacro


Ignore:
Timestamp:
Jun 25, 2019, 7:52:22 PM (5 years ago)
Author:
Ryan J Ollos
Comment:

Patch applied in r17386.

Legend:

Unmodified
Added
Removed
Modified
  • MediaWikiPluginMacro

    v12 v13  
    4444== Installation
    4545
    46 Execute the following steps:
    47 
    48 {{{#!sh
    49 unzip mediawikipluginmacro.zip
    50 cd mediawikipluginmacro
    51 
    52 ### next step (patch) only for python 2.3
    53 python --version
    54 patch -p0 <<EOP
    55 diff -ruNb mediawiki.orig/parser.py mediawiki/parser.py
    56 --- mediawiki.orig/parser.py    2007-07-13 15:17:50.000000000 +0200
    57 +++ mediawiki/parser.py 2008-04-25 11:00:59.000000000 +0200
    58 @@ -5,7 +5,7 @@
    59  """
    60  
    61  import re, random, math, locale
    62 -from base64 import b64encode, b64decode
    63 +from base64 import decodestring
    64  from trac.core import *
    65  from trac.wiki.api import IWikiMacroProvider
    66  
    67 @@ -920,7 +920,10 @@
    68  
    69  def slugify(text):
    70          """docstring for slugify"""
    71 -        return u'/'.join(slugifyBit(t) for t in text.split(u'/'))
    72 +        temp = []
    73 +        for t in text.split( u'/' ):
    74 +            temp.append( slugifyBit( t ) )
    75 +        return u'/'.join( temp )
    76  
    77  _linkPat = re.compile(ur'^([A-Za-z0-9\s]+:)?([A-Za-z0-9_\.\-\s\/]+)(?:\|([^\n]+?))?\]\](.*)$', re.UNICODE | re.DOTALL)
    78  def replaceInternalLinks(text):
    79 @@ -1329,8 +1332,8 @@
    80                  m = _templateSectionPat.search(headline)
    81                  if m:
    82                          istemplate = True
    83 -                        templatetitle = b64decode(m[0])
    84 -                        templatesection = 1 + int(b64decode(m[1]))
    85 +                        templatetitle = decodestring(m[0])
    86 +                        templatesection = 1 + int(decodestring(m[1]))
    87                          headline = _templateSectionPat.sub(u'', headline)
    88                  
    89                  if toclevel:
    90 EOP
    91 
    92 python setup.py install
    93 }}}
     46General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page.
    9447
    9548== Recent Changes