Permalink
Browse files

Fixed codeblock starting with number

  • Loading branch information...
1 parent a1c11c1 commit 1866232324f338e5a8cb5e7bd7bad6cbe1725630 @ndpar ndpar committed May 12, 2013
Showing with 5 additions and 2 deletions.
  1. +2 −1 .gitignore
  2. +1 −1 src/markdown.erl
  3. +1 −0 src/markdown_tests.hrl
  4. +1 −0 tests/generate_tests.js
View
@@ -1 +1,2 @@
-*.beam
+*.beam
+/.eunit/
View
@@ -507,7 +507,7 @@ t_l1([[{{ws, _}, _}, {{md, dash}, _},
t_l1(T, A1, [{{ul, make_list_str([W | T1])}, H} | A2]);
%% types ordered lists...
-t_l1([[{{ws, _}, _}, {num, _} = N1| T1] | T], A1, A2) ->
+t_l1([[{{ws, WS}, _}, {num, _} = N1| T1] | T], A1, A2) when WS /= comp ->
t_l1(T, A1, [type_ol([N1 | T1]) | A2]);
t_l1([[{num, _} | _T] = H | T], A1, A2) ->
t_l1(T, A1, [type_ol(H) | A2]);
@@ -12,6 +12,7 @@ unit_test_() ->
?_assertEqual("<table>\n<img src=\"http://example.com\">\n</table>", conv("<table>\n<img src=\"http://example.com\">\n</table>")),
% ?_assertEqual("<table>\n<tr>\n<td>\n***FAQ*** - *WTF?* Postal Chess Records is a mash-up between Postal Chess and Chess Records where two Record Selectors slug it out over the interwebs in a sonic-soundclash, duh!\n</td>\n<td>\n<img src=\"http://imgur.com/VmdEL.png\">\n</td>\n</tr>\n</table>", conv("<table>\n<tr>\n<td>\n***FAQ*** - *WTF?* Postal Chess Records is a mash-up between Postal Chess and Chess Records where two Record Selectors slug it out over the interwebs in a sonic-soundclash, duh!\n</td>\n<td>\n<img src=\"http://imgur.com/VmdEL.png\">\n</td>\n</tr>\n</table>")),
% ?_assertEqual("<form action=\"https://checkout.google.com/api/checkout/v2/\ncheckoutForm/Merchant/960226209420618\" id=\"BB_BuyButtonForm\"\nmethod=\"post\" name=\"BB_BuyButtonForm\" target=\"_top\">\n<input name=\"item_name_1\" type=\"hidden\" value=\"Premium\nHypernumbers Account\"/><input name=\"item_description_1\" \ntype=\"hidden\" value=\"Premium Hypernumbers Account\"/>\n<input name=\"item_quantity_1\" type=\"hidden\" value=\"1\"/>\n<input name=\"item_price_1\" type=\"hidden\" value=\"90.0\"/>\n<input name=\"item_currency_1\" type=\"hidden\" value=\"GBP\"/>\n<input name=\"_charset_\" type=\"hidden\" value=\"utf-8\"/>\n<input alt=\"\" src=\"https://checkout.google.com/buttons/buy.gif?\nmerchant_id=960226209420618&amp;w=117&amp;h=48&amp;style=white&amp;\nvariant=text&amp;loc=en_US\" type=\"image\"/></form>", conv("<form action=\"https://checkout.google.com/api/checkout/v2/\ncheckoutForm/Merchant/960226209420618\" id=\"BB_BuyButtonForm\"\nmethod=\"post\" name=\"BB_BuyButtonForm\" target=\"_top\">\n<input name=\"item_name_1\" type=\"hidden\" value=\"Premium\nHypernumbers Account\"/><input name=\"item_description_1\" \ntype=\"hidden\" value=\"Premium Hypernumbers Account\"/>\n<input name=\"item_quantity_1\" type=\"hidden\" value=\"1\"/>\n<input name=\"item_price_1\" type=\"hidden\" value=\"90.0\"/>\n<input name=\"item_currency_1\" type=\"hidden\" value=\"GBP\"/>\n<input name=\"_charset_\" type=\"hidden\" value=\"utf-8\"/>\n<input alt=\"\" src=\"https://checkout.google.com/buttons/buy.gif?\nmerchant_id=960226209420618&amp;w=117&amp;h=48&amp;style=white&amp;\nvariant=text&amp;loc=en_US\" type=\"image\"/></form>\n")),
+ ?_assertEqual("<pre><code>def positive = {\n 0 &lt; it\n}\n</code></pre>", conv(" def positive = {\n 0 < it\n }")),
?_assertEqual("<h3>\nLets let html through\n</h3>", conv("<h3>\nLets let html through\n</h3>")),
?_assertEqual("<p>&copy;</p>", conv("&copy;")),
?_assertEqual("<h3 id='test'>\nLets let html through\n</h3>", conv("<h3 id='test'>\nLets let html through\n</h3>")),
@@ -368,6 +368,7 @@ var tests = [
"<h3 id='test'>\nLets let html through\n</h3>",
"&copy;",
"<h3>\nLets let html through\n</h3>",
+ " def positive = {\n 0 < it\n }",
"<form action=\"https://checkout.google.com/api/checkout/v2/\ncheckoutForm/Merchant/960226209420618\" id=\"BB_BuyButtonForm\"\nmethod=\"post\" name=\"BB_BuyButtonForm\" target=\"_top\">\n<input name=\"item_name_1\" type=\"hidden\" value=\"Premium\nHypernumbers Account\"/><input name=\"item_description_1\" \ntype=\"hidden\" value=\"Premium Hypernumbers Account\"/>\n<input name=\"item_quantity_1\" type=\"hidden\" value=\"1\"/>\n<input name=\"item_price_1\" type=\"hidden\" value=\"90.0\"/>\n<input name=\"item_currency_1\" type=\"hidden\" value=\"GBP\"/>\n<input name=\"_charset_\" type=\"hidden\" value=\"utf-8\"/>\n<input alt=\"\" src=\"https://checkout.google.com/buttons/buy.gif?\nmerchant_id=960226209420618&amp;w=117&amp;h=48&amp;style=white&amp;\nvariant=text&amp;loc=en_US\" type=\"image\"/></form>\n",
"<table>\n<tr>\n<td>\n***FAQ*** - *WTF?* Postal Chess Records is a mash-up between Postal Chess and Chess Records where two Record Selectors slug it out over the interwebs in a sonic-soundclash, duh!\n</td>\n<td>\n<img src=\"http://imgur.com/VmdEL.png\">\n</td>\n</tr>\n</table>",
"<table>\n<img src=\"http://example.com\">\n</table>",

0 comments on commit 1866232

Please sign in to comment.