ruby-bbcode-to-md 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,6 +52,7 @@ module RubyBBCode
|
|
52
52
|
@opening_html = ""
|
53
53
|
@closing_html = ""
|
54
54
|
|
55
|
+
# this bit doesn't really work because parent_type isn't set correctly.
|
55
56
|
# if this is a nested tag, then don't prefix first_html_open
|
56
57
|
if !node.definition[:first_html_open].nil? && node.type != node.parent_type then
|
57
58
|
@opening_html << node.definition[:first_html_open]
|
@@ -33,7 +33,7 @@ module RubyBBCode
|
|
33
33
|
element = {:is_tag => true, :tag => @ti[:tag].to_sym, :definition => @ti.definition, :nodes => TagCollection.new }
|
34
34
|
element[:params] = {:tag_param => get_formatted_element_params} if @ti.can_have_params? and @ti.has_params?
|
35
35
|
@bbtree.build_up_new_tag(element)
|
36
|
-
|
36
|
+
|
37
37
|
@bbtree.escalate_bbtree(element)
|
38
38
|
when :text
|
39
39
|
set_parent_tag_from_multi_tag_to_concrete! if @bbtree.current_node.definition && @bbtree.current_node.definition[:multi_tag] == true
|
data/lib/tags/tags.rb
CHANGED
@@ -57,16 +57,16 @@ module RubyBBCode
|
|
57
57
|
:only_allow => [],
|
58
58
|
:require_between => true,
|
59
59
|
:allow_tag_param => true, :allow_tag_param_between => true,
|
60
|
-
:tag_param => /^((((http|https|ftp):\/\/)|\/).+)$/, :tag_param_tokens => [{ :token => :url }],
|
60
|
+
:tag_param => /^((((http|https|ftp|irc):\/\/)|\/).+)$/, :tag_param_tokens => [{ :token => :url }],
|
61
61
|
:tag_param_description => 'The URL should start with http:// https://, ftp:// or /, instead of \'%param%\'' },
|
62
62
|
:quote => {
|
63
63
|
:first_html_open => "\n", :last_html_close => "\n",
|
64
|
-
:html_open => "%author
|
64
|
+
:html_open => "--- begin quote from %author%\n", :html_close => "--- end quote\n",
|
65
65
|
:description => 'Quote another person',
|
66
66
|
:example => '[quote]BBCode is great[/quote]',
|
67
67
|
:allow_tag_param => true, :allow_tag_param_between => false,
|
68
68
|
:tag_param => /(.*)/,
|
69
|
-
:tag_param_tokens => [{:token => :author, :prefix => '
|
69
|
+
:tag_param_tokens => [{:token => :author, :prefix => '', :postfix => ""}]},
|
70
70
|
:size => {
|
71
71
|
:html_open => '[size=%size%]', :html_close => '[/size]',
|
72
72
|
:description => 'Change the size of the text',
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-bbcode-to-md
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-11-
|
13
|
+
date: 2013-11-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -108,7 +108,7 @@ rubyforge_project:
|
|
108
108
|
rubygems_version: 1.8.23
|
109
109
|
signing_key:
|
110
110
|
specification_version: 3
|
111
|
-
summary: ruby-bbcode-to-md-0.0.
|
111
|
+
summary: ruby-bbcode-to-md-0.0.3
|
112
112
|
test_files:
|
113
113
|
- test/ruby_bbcode_test.rb
|
114
114
|
- test/test_helper.rb
|