Пример #1
0
 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"))
Пример #2
0
 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"))