Commits

camlspotter  committed 3412ecf

it/b fix

  • Participants
  • Parent commits 910ec02

Comments (0)

Files changed (1)

File extensions/hatenaWriter.py

         Block.__init__(self, parent)
         self.level = level
 
+    # restricted to ***
     def to_string(self, indent):
-        return '*' * self.level + ' ' + Block.try_inline_internal(self)
+        return '*' * min(3, self.level) + ' ' + Block.try_inline_internal(self)
 
 class Par(Block):
     def __init__(self, parent):
     def to_string(self, indent):
         return '>|' + self.lang + '|\n' + Block.to_string(self, 0) + '\n||<'
 
+class BlockQuote(Block):
+    def __init__(self, parent):
+        Block.__init__(self, parent)
+        
+    def append_string(self, elem):
+        self.contents.extend(elem.split('\n'))
+
+    def to_string(self, indent):
+        return '>>\n' + Block.to_string(self, 0) + '\n<<'
+
 class Verbose(Block):
     def __init__(self, parent, name):
         Block.__init__(self, parent)
 #        pass
 
     def visit_block_quote(self, node):
-        self.new_block(Verbose, "block_quote")
+        self.new_block(BlockQuote)
     def depart_block_quote(self, node):
         self.end_block()
 
 #        pass
 
     def visit_emphasis(self, node):
-        self.add_text('<it>')
+        self.add_text('<span class="deco" style="font-style:italic;">')
     def depart_emphasis(self, node):
-        self.add_text('</it>')
+        self.add_text('</span>')
 
 #    def visit_literal_emphasis(self, node):
 #        self.add_text('<it>')
 #        self.add_text('</it>')
 
     def visit_strong(self, node):
-        self.add_text('<b>')
+        self.add_text('<span class="deco" style="font-weight:bold;">')
     def depart_strong(self, node):
-        self.add_text('</b>')
+        self.add_text('</span>')
 
 #    def visit_abbreviation(self, node):
 #        self.add_text('')