changeset 42:f1e33f7ad2e6

don't emit line anchors when processing i18n strings imported from: moin--main--1.5--patch-43
author Thomas Waldmann <tw@waldmann-edv.de>
date Sun, 25 Sep 2005 22:47:10 +0000
parents c809dbc92962
children dc640ea37379
files MoinMoin/i18n/__init__.py MoinMoin/parser/wiki.py
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/i18n/__init__.py	Sun Sep 25 22:21:23 2005 +0000
+++ b/MoinMoin/i18n/__init__.py	Sun Sep 25 22:47:10 2005 +0000
@@ -86,7 +86,7 @@
     origtext = text
     out = StringIO.StringIO()
     request.redirect(out)
-    parser = Parser(text, request)
+    parser = Parser(text, request, line_anchors=False)
     formatter = Formatter(request, terse = True)
     reqformatter = None
     if hasattr(request, 'formatter'):
--- a/MoinMoin/parser/wiki.py	Sun Sep 25 22:21:23 2005 +0000
+++ b/MoinMoin/parser/wiki.py	Sun Sep 25 22:47:10 2005 +0000
@@ -106,7 +106,7 @@
         self.form = request.form
         self._ = request.getText
         self.cfg = request.cfg
-
+        self.line_anchors = kw.get('line_anchors', True)
         self.macro = None
 
         self.is_em = 0
@@ -932,7 +932,8 @@
         # Main loop
         for line in self.lines:
             self.lineno += 1
-            self.request.write(self.formatter.line_anchordef(self.lineno))
+            if self.line_anchors:
+                self.request.write(self.formatter.line_anchordef(self.lineno))
             self.table_rowstart = 1
             self.line_was_empty = self.line_is_empty
             self.line_is_empty = 0