def testEscapeInside(self): s = u"abc {{ end with \}} and you're done }} aaa" f = InlineCodeFormatter(s, 0) frags, next = f.apply() self.assertEqual(u"".join(frags), u"abc <code> end with }} and you're done </code>") self.assertEqual(next, s.index(" aaa"))
def testOneLiner(self): s = u"abc {{def ghi}} jkl" f = InlineCodeFormatter(s, 0) frags, next = f.apply() self.assertEqual(u"".join(frags), u"abc <code>def ghi</code>") self.assertEqual(next, s.index(" jkl"))