Skip to content

Commit 5bd056c

Browse files
committed
Bug fixed
1 parent 129eb54 commit 5bd056c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/html2textile.rb

+3-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@
1717
# parser.feed(input_html)
1818
# puts parser.to_textile
1919
class HTMLToTextileParser < SgmlParser
20-
21-
# TDH removed span from quicktags and set p to empty string
22-
# removed blockquote pair
20+
# removed blockquote pair
2321
PAIRS = { 'p' => ''}
24-
QUICKTAGS = { 'b' => '*', 'strong' => '*',
22+
QUICKTAGS = { 'b' => '*', 'strong' => '*', 'span' => '',
2523
'i' => '_', 'em' => '_', 'cite' => '??', 's' => '-',
2624
'sup' => '^', 'sub' => '~', 'code' => '@'}
2725

@@ -120,7 +118,7 @@ def handle_data(data)
120118

121119
%w[1 2 3 4 5 6].each do |num|
122120
define_method "start_h#{num}" do |attributes|
123-
make_block_start_pair("h#{num}", attributes)
121+
make_block_start_pair("h#{num}. ", attributes)
124122
end
125123

126124
define_method "end_h#{num}" do

0 commit comments

Comments
 (0)