format basic font styles

This commit is contained in:
Elan Ruusamäe 2012-06-19 23:50:03 +02:00
parent 5adb9db834
commit af210c27f2
2 changed files with 13 additions and 4 deletions

View file

@ -4,3 +4,11 @@
=== Header 3 === === Header 3 ===
==== Header 4 ==== ==== Header 4 ====
===== Header 5 ===== ===== Header 5 =====
= Font styles =
{{{
Normal text, ''emphasized'', '''strong''', __underline__, ,,subscript,,, ^superscript^, `typewriter` and {{{typewriter}}}.
}}}
Normal text, ''emphasized'', '''strong''', __underline__, ,,subscript,,, ^superscript^, `typewriter` and {{{typewriter}}}.

View file

@ -85,8 +85,8 @@ class Formatter(FormatterBase):
return text return text
def rule(self, size=0, **kw): def rule(self, size=0, **kw):
# size not supported # size not supported
return '----\n' return '----\n'
def icon(self, type): def icon(self, type):
return '<icon type="%s" />' % type return '<icon type="%s" />' % type
@ -116,7 +116,8 @@ class Formatter(FormatterBase):
return ['<li>', '</li>\n'][not on] return ['<li>', '</li>\n'][not on]
def code(self, on, **kw): def code(self, on, **kw):
return ['<code>', '</code>'][not on] """ `typewriter` or {{{typerwriter}}, for code blocks i hope codeblock works """
return ["''", "''"][not on]
def sup(self, on, **kw): def sup(self, on, **kw):
return ['<sup>', '</sup>'][not on] return ['<sup>', '</sup>'][not on]
@ -170,7 +171,7 @@ class Formatter(FormatterBase):
return ('<link anchor="%s"%s>' % (name, extra) ,'</link>') [not on] return ('<link anchor="%s"%s>' % (name, extra) ,'</link>') [not on]
def underline(self, on, **kw): def underline(self, on, **kw):
return self.strong(on) # no underline in StyleBook return ['__', '__'][not on]
def definition_list(self, on, **kw): def definition_list(self, on, **kw):
result = '' result = ''