Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Failing test case for (now closed) issue #93: a C-style multi-line co…

…mment eats a leading '*', thus not generating a <ul>
  • Loading branch information...
commit d2b9e8e434261d35e9874b42d935d6f6716d5064 1 parent 727c510
Davis W. Frank authored
Showing with 35 additions and 0 deletions.
  1. +17 −0 test/fixtures/issue93.js
  2. +18 −0 test/test_reported_issues.rb
View
17 test/fixtures/issue93.js
@@ -0,0 +1,17 @@
+// # Markdown <ul>:
+//
+// * is a bullet 1
+// * is a bullet 2
+function foo() {
+}
+
+/*
+
+# Markdown <ul>:
+
+* should be a bullet 1
+* should be a bullet 2
+
+*/
+function foo() {
+}
View
18 test/test_reported_issues.rb
@@ -83,4 +83,22 @@ def test_issue15_extra_space_after_comment_character_remains
)
assert_equal("<h2>Comment 1</h2>\n", r.sections[0][0])
end
+
+ def test_issue93_markdown_bullets_squashed
+ # A 'C-style' multi-line comment with a Markdown bulleted list is not turned into a <ul>
+ # http://github.com/rtomayko/rocco/issues/93
+
+ r = Rocco.new( File.dirname(__FILE__) + "/fixtures/issue93.js" )
+ html = r.to_html
+
+ puts html
+ assert(
+ html.match(/<ul>\s*<li>is a bullet 1<\/li>/),
+ "Unordered lists in C-style single-line comments should turn into <ul>"
+ )
+ assert(
+ html.match(/<ul>\s*<li>should be a bullet 1<\/li>/),
+ "Unordered lists in C-style multi-line comments should turn into <ul>"
+ )
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.