Skip to content
Browse files

v0.14

  • Loading branch information...
1 parent 82f1ea9 commit 2346d23281c051d94e72907756214818a801171a @PeterLawrence committed Oct 14, 2010
Showing with 12 additions and 3 deletions.
  1. +1 −0 README.md
  2. +1 −1 init.rb
  3. +10 −2 lib/html2textile.rb
View
1 README.md
@@ -24,5 +24,6 @@ History
12 Oct 2010 - v0.11 - fixed bug related to saving raw html in Wysiwyg mode.
14 Oct 2010 - v0.12 - preview now works in wysiwyg mode.
14 Oct 2010 - v0.13 - preview now works for google chrome and IE
+14 Oct 2010 - v0.14 - removed P. from html to textile, replaced with just a return (\n)
View
2 init.rb
@@ -11,7 +11,7 @@
name 'Redmine Wysiwyg Textile'
author 'P.J. Lawrence'
description 'A TinyMCE test application for Textile wiki pages'
- version '0.13'
+ version '0.14'
wiki_format_provider 'textile wysiwyg', RedmineWysiwygTextile::WikiFormatter, \
RedmineWysiwygTextile::Helper
View
12 lib/html2textile.rb
@@ -108,11 +108,12 @@ def handle_data(data)
end
end
- PAIRS = { 'blockquote' => 'bq', 'p' => 'p' }
+ #PAIRS = { 'blockquote' => 'bq', 'p' => 'p' }
+ PAIRS = { 'blockquote' => 'bq' } # p removed 14/10/10
QUICKTAGS = { 'b' => '*', 'strong' => '*',
'i' => '_', 'em' => '_', 'cite' => '??', 's' => '-',
'sup' => '^', 'sub' => '~', 'code' => '@', 'span' => '%',
- 'del' => '-', 'ins' => '+','pre' => 'pre'}
+ 'del' => '-', 'ins' => '+','pre' => 'pre', 'p' => ''} # p added 14/10/10
PAIRS.each do |key, value|
define_method "start_#{key}" do |attributes|
@@ -197,6 +198,13 @@ def start_img(attrs)
def end_img
end
+ def start_p(attrs)
+ end
+
+ def end_p
+ write("\n\n")
+ end
+
def start_pre(attrs)
write("\n<pre>\n")
end

0 comments on commit 2346d23

Please sign in to comment.
Something went wrong with that request. Please try again.