Skip to content
Browse files

Production Bug Fix 1.1.12

  • Loading branch information...
1 parent f67c5f1 commit 7199abc85b24dc7eae90dc8335ed8ee5b8855f41 Gordon Guthrie committed Mar 22, 2010
Showing with 41 additions and 18 deletions.
  1. +5 −0 README
  2. +5 −0 README.html
  3. +4 −1 src/markdown.erl
  4. +5 −0 src/markdown_tests.hrl
  5. +6 −1 tests/generate_tests.js
  6. +16 −16 tests/index.html
View
5 README
@@ -19,6 +19,11 @@ The code that generates tests from them in in the escript file:
Release Notes
=============
+Version 1.1.12 Production Bug Fix
+---------------------------------
+
+Bug fix for "<>"
+
Version 1.1.11 Production Bug Fix
---------------------------------
View
5 README.html
@@ -18,6 +18,11 @@
<h1>Release Notes</h1>
+<h2>Version 1.1.12 Production Bug Fix</h2>
+
+
+<p>Bug fix for "&lt;>"</p>
+
<h2>Version 1.1.11 Production Bug Fix</h2>
View
5 src/markdown.erl
@@ -49,7 +49,7 @@ conv(String) -> Lex = lex(String),
% io:format("UntypedLines are ~p~n", [UntypedLines]),
{TypedLines, Refs} = type_lines(UntypedLines),
% io:format("TypedLines are ~p~nRefs is ~p~n",
- % [TypedLines, Refs]),
+ % [TypedLines, Refs]),
parse(TypedLines, Refs).
-spec conv_utf8(list()) -> list().
@@ -982,6 +982,9 @@ openingdiv1([$/,$>| T], Acc) -> Acc2 = flatten(reverse(Acc)),
[Tag | _T] = string:tokens(Acc3, " "),
{{{{tag, self_closing}, Tag}, "<"
++ Acc2 ++ "/>"}, T};
+%% special for non-tags
+openingdiv1([$>| T], []) -> {[{{punc, bra}, "<"},
+ {{punc, ket}, ">"}], T};
openingdiv1([$>| T], Acc) -> Acc2 = flatten(reverse(Acc)),
Acc3 = string:to_lower(Acc2),
[Tag | _T] = string:tokens(Acc3, " "),
View
5 src/markdown_tests.hrl
@@ -1,6 +1,11 @@
%% Do not edit this file - it is generated with ../tests/index.html
unit_test_() ->
[
+ ?_assertEqual("<p>=></p>", conv("=>")),
+ ?_assertEqual("<blockquote>\n <p>=</p>\n</blockquote>", conv(">=")),
+ ?_assertEqual("<p>=&lt;</p>", conv("=<")),
+ ?_assertEqual("<p>&lt;=</p>", conv("<=")),
+ ?_assertEqual("<p>&lt;></p>", conv("<>")),
% ?_assertEqual("<p><flame on>\nblah\n</flame off>\n<bingo>\n<bingo master></p>", conv("<flame on>\nblah\n</flame off>\n<bingo>\n<bingo master>")),
% ?_assertEqual("<p><flame on>\n</flame on></p>", conv("<flame on>\n</flame on>")),
?_assertEqual("<p><flame on></p>", conv("<flame on>")),
View
7 tests/generate_tests.js
@@ -373,7 +373,12 @@ var tests = [
"<table>\n<img src=\"http://example.com\">\n</table>",
"<flame on>",
"<flame on>\n</flame on>",
-"<flame on>\nblah\n</flame off>\n<bingo>\n<bingo master>"
+"<flame on>\nblah\n</flame off>\n<bingo>\n<bingo master>",
+"<>",
+"<=",
+"=<",
+">=",
+"=>"
];
var converter;
View
32 tests/index.html
@@ -1,19 +1,19 @@
<html>
- <head>
- <title>Showdown Compatibility Unit Test Generator for erlmarkdown</title>
- </head>
- <body>
- <h1>Showdown Compatibility Unit Test Generator For <code>erlmarkdown</code></h1>
- <h2>Purpose</h2>
- <p>erlmarkdown is a server-side implementation of markdown written in Erlang. In order to practically use it, you need a client side implementation (written in javascript) which <em>produces the same outputs from the same inputs</em>.</p>
- <p>The client-side library of choice for <code>erlmarkdown</code> is <code>showdown</code> from <a href="http://attacklab.com">Attack Labs</a>.</p>
- <p>It is not clear if showdown is still maintained - it is not available
- from a version control system. The current version we track is 0.9 and the
- source code is included with erlmarkdown.</p>
- <p>This page just has a set of markdown terms in it which it runs through showdown to generate the unit tests that are included in <code>erlmarkdown</code></p>
- <textarea id="tests" cols=120 rows=20></textarea>
- <script src="./showdown.js"></script>
- <script src="./generate_tests.js"></script>
- </body>
+<head>
+<title>Showdown Compatibility Unit Test Generator for erlmarkdown</title>
+</head>
+<body>
+<h1>Showdown Compatibility Unit Test Generator For <code>erlmarkdown</code></h1>
+<h2>Purpose</h2>
+<p>erlmarkdown is a server-side implementation of markdown written in Erlang. In order to practically use it, you need a client side implementation (written in javascript) which <em>produces the same outputs from the same inputs</em>.</p>
+<p>The client-side library of choice for <code>erlmarkdown</code> is <code>showdown</code> from <a href="http://attacklab.com">Attack Labs</a>.</p>
+<p>It is not clear if showdown is still maintained - it is not available
+from a version control system. The current version we track is 0.9 and the
+source code is included with erlmarkdown.</p>
+<p>This page just has a set of markdown terms in it which it runs through showdown to generate the unit tests that are included in <code>erlmarkdown</code></p>
+<textarea id="tests_display" cols=120 rows=20></textarea>
+<script src="./showdown.js"></script>
+<script src="./generate_tests.js"></script>
+</body>
</html>

0 comments on commit 7199abc

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