コード例 #1
0
ファイル: iteminfo.py プロジェクト: franzmelchiori/alyvix
 def details(self):
     return ('<table>'
             '<tr><td><i>Name:</i></td><td>%s</td></tr>'
             '<tr><td><i>Source:</i></td><td>%s &lt;%s&gt;</td></tr>'
             '<tr><td><i>Arguments:</i></td><td>%s</td></tr>'
             '</table>'
             '<table>'
             '<tr><td>%s</td></tr>'
             '</table>') % \
             (self._name(self.item), self._source(self.item), self._type,
              self._format_args(self.arguments),
              utils.html_format(self.doc))
コード例 #2
0
ファイル: iteminfo.py プロジェクト: Garjy/RIDE
 def details(self):
     return ('<table>'
             '<tr><td><i>Name:</i></td><td>%s</td></tr>'
             '<tr><td><i>Source:</i></td><td>%s &lt;%s&gt;</td></tr>'
             '<tr><td><i>Arguments:</i></td><td>%s</td></tr>'
             '</table>'
             '<table>'
             '<tr><td>%s</td></tr>'
             '</table>') % \
             (self._name(self.item), self._source(self.item), self._type,
              self._format_args(self.arguments),
              utils.html_format(self.doc))
コード例 #3
0
ファイル: iteminfo.py プロジェクト: nagyist/RIDE
 def details(self):
     return (
         "<table>"
         "<tr><td><i>Name:</i></td><td>%s</td></tr>"
         "<tr><td><i>Source:</i></td><td>%s &lt;%s&gt;</td></tr>"
         "<tr><td><i>Arguments:</i></td><td>%s</td></tr>"
         "</table>"
         "<table>"
         "<tr><td>%s</td></tr>"
         "</table>"
     ) % (
         self._name(self.item),
         self._source(self.item),
         self._type,
         self._format_args(self.arguments),
         html_format(self.doc),
     )
コード例 #4
0
 def visible_value(self):
     return utils.html_format(utils.unescape(self.value))
コード例 #5
0
 def test_formatting(self):
     formated = utils.html_format('| foo | bar |\n| zoo | zaa |\n\nhello')
     self.assertEqual(
         '<table border="1">\n<tr>\n<td>foo</td>\n<td>bar</td>\n</tr>\n<tr>\n<td>zoo</td>\n<td>zaa</td>\n</tr>\n</table>\n<p>hello</p>',
         formated)
コード例 #6
0
ファイル: settingcontrollers.py プロジェクト: blueenergy/RIDE
 def visible_value(self):
     return utils.html_format(utils.unescape(self.value))
コード例 #7
0
 def test_formatting(self):
     formated = utils.html_format('| foo | bar |\n| zoo | zaa |\n\nhello')
     self.assertEqual('<table border="1">\n<tr>\n<td>foo</td>\n<td>bar</td>\n</tr>\n<tr>\n<td>zoo</td>\n<td>zaa</td>\n</tr>\n</table>\n<p>hello</p>', formated)