From af210c27f286e0e40c959d204184fce0acbc8c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 19 Jun 2012 23:50:03 +0200 Subject: [PATCH] format basic font styles --- syntaxreference.txt | 8 ++++++++ text_dokuwiki.py | 9 +++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/syntaxreference.txt b/syntaxreference.txt index a74788c..130fa77 100644 --- a/syntaxreference.txt +++ b/syntaxreference.txt @@ -4,3 +4,11 @@ === Header 3 === ==== Header 4 ==== ===== Header 5 ===== + += Font styles = +{{{ +Normal text, ''emphasized'', '''strong''', __underline__, ,,subscript,,, ^superscript^, `typewriter` and {{{typewriter}}}. +}}} + +Normal text, ''emphasized'', '''strong''', __underline__, ,,subscript,,, ^superscript^, `typewriter` and {{{typewriter}}}. + diff --git a/text_dokuwiki.py b/text_dokuwiki.py index 1ad6cff..c4aebf1 100644 --- a/text_dokuwiki.py +++ b/text_dokuwiki.py @@ -85,8 +85,8 @@ class Formatter(FormatterBase): return text def rule(self, size=0, **kw): - # size not supported - return '----\n' + # size not supported + return '----\n' def icon(self, type): return '' % type @@ -116,7 +116,8 @@ class Formatter(FormatterBase): return ['
  • ', '
  • \n'][not on] def code(self, on, **kw): - return ['', ''][not on] + """ `typewriter` or {{{typerwriter}}, for code blocks i hope codeblock works """ + return ["''", "''"][not on] def sup(self, on, **kw): return ['', ''][not on] @@ -170,7 +171,7 @@ class Formatter(FormatterBase): return ('' % (name, extra) ,'') [not on] def underline(self, on, **kw): - return self.strong(on) # no underline in StyleBook + return ['__', '__'][not on] def definition_list(self, on, **kw): result = ''