This repository was archived by the owner on Feb 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ def escalate_bbtree(element)
46
46
47
47
# Step down the bbtree a notch because we've reached a closing tag
48
48
def retrogress_bbtree
49
- # print @tags_list[-1].inspect
50
49
if @tags_list [ -1 ] . definition [ :self_closable ]
51
50
# It is possible that the next (self_closable) tag is on the next line
52
51
# Remove newline of current tag and parent tag as they are (probably) not intented as an actual newline here but as tag separator
@@ -58,8 +57,7 @@ def retrogress_bbtree
58
57
# The parsed data manifests in @bbtree.current_node.children << TagNode.new(element) which I think is more confusing than needed
59
58
60
59
if within_open_tag?
61
- # Set the current node to be the node we've just parsed over which is infact within another node??...
62
- @current_node = TagNode . new ( self . nodes . last )
60
+ @current_node = @tags_list [ -1 ]
63
61
else # If we're still at the root of the BBTree or have returned back to the root via encountring closing tags...
64
62
@current_node = TagNode . new ( { :nodes => self . nodes } ) # Note: just passing in self works too...
65
63
end
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ def test_unordered_list
55
55
56
56
def test_list_common_syntax
57
57
assert_equal '<ul><li>item 1</li><li>item 2</li></ul>' , '[list][*]item 1[*]item 2[/list]' . bbcode_to_html
58
+ assert_equal '<ul><li><strong>item 1</strong> test</li><li>item 2</li></ul>' , "[list]\n [*][b]item 1[/b] test[*]item 2[/list]" . bbcode_to_html
58
59
end
59
60
60
61
def test_newline_list_common_syntax
You can’t perform that action at this time.
0 commit comments