Changes between Version 1 and Version 2 of contentBBCode_parser


Ignore:
Timestamp:
Oct 22, 2009, 5:01:35 PM (15 years ago)
Author:
bugmenot
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • contentBBCode_parser

    v1 v2  
    3535                vals['code'] = tag[2]
    3636                vals['tag'] = '[rk:' + tag[0] + ' ' + tag[1] + ']' + tag[2] + '[/rk:' + tag[0] + ']'
    37                 if not parsed_double.has_key(k):
     37                if k not in parsed_double:
    3838                        parsed_double[k] = list()
    3939                parsed_double[k].append(vals)
     
    6262                        vals['attributes'][attr[0]] = attr[1]
    6363                vals['tag'] = '[rk:' + tag[0] + ' ' + tag[1] + ']'
    64                 if not parsed.has_key(k):
     64                if k not in parsed:
    6565                        parsed[k] = list()
    6666                parsed[k].append(vals)
     
    203203        text = text + '<script class="javascript" src="/site_media/syntax/Scripts/shCore.js"></script>'
    204204        # add only those lang-JS files that we realy need. For example i limit it to two
    205         if langs.has_key('python'):
     205        if 'python' in langs:
    206206                text = text + '<script class="javascript" src="/site_media/syntax/Scripts/shBrushPython.js"></script>'
    207         if langs.has_key('xml'):
     207        if 'xml' in langs:
    208208                text = text + '<script class="javascript" src="/site_media/syntax/Scripts/shBrushXml.js"></script>'
    209209        # the end, activate the code
Back to Top