Beispiel #1
0
    def markup_text(self, text, card_vals):
        # First, let's look for rule references
        ruleref_re = re.compile(r'((\d\d\d)\.(\d{1,3}[a-z]?))', re.U)
        result = ruleref_re.sub(r'<a href="\2#\1">\1</a>', text)
        ruleref2_re = re.compile(r'([Rr]ule) (\d\d\d)', re.U)
        result = ruleref2_re.sub(r'\1 <a href="\2">\2</a>', result)

        # Get all of the cards, and replace them!
        make_links_to_cards(result, card_vals)

        result = convertSymbolsToHTML(result)

        return result
Beispiel #2
0
 def rules_text_html(self):
     return convertSymbolsToHTML(self.basecard.rules_text)
Beispiel #3
0
 def mana_cost_html(self):
     return convertSymbolsToHTML(self.basecard.mana_cost)