Attachment 'text_moin_wiki2.diff'

Download

   1 diff -r 5932b2b3bbeb MoinMoin/parser/text_moin_wiki.py
   2 --- a/MoinMoin/parser/text_moin_wiki.py	Tue May 01 22:08:44 2007 +0200
   3 +++ b/MoinMoin/parser/text_moin_wiki.py	Sat May 05 23:19:22 2007 +0200
   4 @@ -256,8 +256,13 @@ class Parser:
   5      def _remark_repl(self, word):
   6          """Handle remarks."""
   7          # XXX we don't really enforce the correct sequence /* ... */ here
   8 +        _ = self._
   9          self.is_remark = not self.is_remark
  10 -        return self.formatter.span(self.is_remark, css_class='comment')
  11 +        if self.is_remark:
  12 +            return self.formatter.span(self.is_remark, css_class='comment') + self.formatter.text(_('[inline comment begin]'), css_class='screenreader_info')
  13 +        else:
  14 +            return self.formatter.text(_('[inline comment end]'), css_class='screenreader_info') + self.formatter.span(self.is_remark, css_class='comment') 
  15 +
  16  
  17      def _small_repl(self, word):
  18          """Handle small."""
  19 @@ -962,6 +967,7 @@ class Parser:
  20          """ For each line, scan through looking for magic
  21              strings, outputting verbatim any intervening text.
  22          """
  23 +        _ = self._
  24          self.formatter = formatter
  25          self.hilite_re = self.formatter.page.hilite_re
  26  
  27 @@ -994,6 +1000,8 @@ class Parser:
  28  
  29          if self.wrapping_div_class:
  30              self.request.write(self.formatter.div(1, css_class=self.wrapping_div_class))
  31 +            if 'comment' in self.wrapping_div_class.split():
  32 +                self.request.write(self.formatter.text(_('[comment section begin]'), css_class='screenreader_info'))
  33  
  34          # Main loop
  35          for line in self.lines:
  36 @@ -1152,7 +1160,10 @@ class Parser:
  37          if self.in_table: self.request.write(self.formatter.table(0))
  38  
  39          if self.wrapping_div_class:
  40 +            if 'comment' in self.wrapping_div_class.split():
  41 +                self.request.write(self.formatter.text(_('[comment section end]'), css_class='screenreader_info'))
  42              self.request.write(self.formatter.div(0))
  43 +
  44  
  45      # Private helpers ------------------------------------------------------------
  46  

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2007-03-01 18:49:58, 1.6 KB) [[attachment:text_moin_wiki.diff]]
  • [get | view] (2007-05-05 21:34:57, 2.1 KB) [[attachment:text_moin_wiki2.diff]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.