def append_markup(self, markup): """Interpret the markup text as xhtml and append the result to the doc. Args: markup: The markup'ed text to append. """ self._operation_queue.document_append_markup(self.wave_id, self.wavelet_id, self.blip_id, markup) self._content += util.parse_markup(markup)
def append_markup(self, markup): """Interpret the markup text as xhtml and append the result to the doc. Args: markup: The markup'ed text to append. """ markup = util.force_unicode(markup) self._operation_queue.document_append_markup(self.wave_id, self.wavelet_id, self.blip_id, markup) self._content += util.parse_markup(markup)
def testParseMarkup(self): self.assertEquals('foo', util.parse_markup('foo')) self.assertEquals('foo bar', util.parse_markup('foo <b>bar</b>')) self.assertEquals('foo\nbar', util.parse_markup('foo<br>bar')) self.assertEquals('foo\nbar', util.parse_markup('foo<p indent="3">bar'))