Skip to content

Commit

Permalink
Production Bug Fix 1.1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordon Guthrie committed Mar 22, 2010
1 parent f67c5f1 commit 7199abc
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 18 deletions.
5 changes: 5 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -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
---------------------------------

Expand Down
5 changes: 5 additions & 0 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ <h1>DEVELOPER NOTES</h1>
<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>


Expand Down
5 changes: 4 additions & 1 deletion src/markdown.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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().
Expand Down Expand Up @@ -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, " "),
Expand Down
5 changes: 5 additions & 0 deletions src/markdown_tests.hrl
Original file line number Diff line number Diff line change
@@ -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>")),
Expand Down
7 changes: 6 additions & 1 deletion tests/generate_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
32 changes: 16 additions & 16 deletions tests/index.html
Original file line number Diff line number Diff line change
@@ -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.