module Markdown
class HtmlParser < Redmine::WikiFormatting::HtmlParser
- self.tags = {
+ self.tags = tags.merge(
'b' => {:pre => '**', :post => '**'},
'strong' => {:pre => '**', :post => '**'},
'i' => {:pre => '_', :post => '_'},
'em' => {:pre => '_', :post => '_'},
'strike' => {:pre => '~~', :post => '~~'},
- 'br' => {:post => "\n"},
'h1' => {:pre => "\n\n# ", :post => "\n\n"},
'h2' => {:pre => "\n\n## ", :post => "\n\n"},
'h3' => {:pre => "\n\n### ", :post => "\n\n"},
'h4' => {:pre => "\n\n#### ", :post => "\n\n"},
'h5' => {:pre => "\n\n##### ", :post => "\n\n"},
- 'h6' => {:pre => "\n\n###### ", :post => "\n\n"},
- 'style' => ''
- }
+ 'h6' => {:pre => "\n\n###### ", :post => "\n\n"}
+ )
end
end
end
module Textile
class HtmlParser < Redmine::WikiFormatting::HtmlParser
- self.tags = {
+ self.tags = tags.merge(
'b' => {:pre => '*', :post => '*'},
'strong' => {:pre => '*', :post => '*'},
'i' => {:pre => '_', :post => '_'},
'em' => {:pre => '_', :post => '_'},
'u' => {:pre => '+', :post => '+'},
'strike' => {:pre => '-', :post => '-'},
- 'br' => {:post => "\n"},
'h1' => {:pre => "\n\nh1. ", :post => "\n\n"},
'h2' => {:pre => "\n\nh2. ", :post => "\n\n"},
'h3' => {:pre => "\n\nh3. ", :post => "\n\n"},
'h4' => {:pre => "\n\nh4. ", :post => "\n\n"},
'h5' => {:pre => "\n\nh5. ", :post => "\n\n"},
- 'h6' => {:pre => "\n\nh6. ", :post => "\n\n"},
- 'style' => ''
- }
+ 'h6' => {:pre => "\n\nh6. ", :post => "\n\n"}
+ )
end
end
end