From 31a9b23d451e12c6ffa35dd3b7d74b2b38fd1c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 19 Sep 2012 00:55:51 +0200 Subject: [PATCH] newlines to comments --- text_dokuwiki.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/text_dokuwiki.py b/text_dokuwiki.py index 196c2d0..0a269c8 100644 --- a/text_dokuwiki.py +++ b/text_dokuwiki.py @@ -251,7 +251,7 @@ class Formatter(FormatterBase): def comment(self, text): # real comments (lines with two hash marks) if text[0:2] == '##': - return "/* %s */\n" % text[2:] + return "/* %s */\n" % text[2:].strip() # Some kind of Processing Instruction # http://moinmo.in/HelpOnProcessingInstructions @@ -267,13 +267,13 @@ class Formatter(FormatterBase): return 'This page is deprecated\n' if tokens[0] == 'redirect': - return text + return text + "\n" if tokens[0] == 'pragma': # TODO: can do 'description' via 'meta' dokuwiki plugin - return "/* pragma: %s */" % " ".join(tokens[1:]) + return "/* pragma: %s */\n" % " ".join(tokens[1:]) - return "/* %s */" % text.lstrip('#') + return "/* %s */\n" % text.lstrip('#') def macro(self, macro_obj, name, args): def email(args):