aboutsummaryrefslogtreecommitdiffstats
path: root/src/asciideck_parser.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-11-26 16:58:49 +0100
committerLoïc Hoguin <[email protected]>2016-11-26 16:58:49 +0100
commit074e21e93abf0eec59973cc35c9d2755d4a921f9 (patch)
treee21f277389a4c02bd98febbec20d15f463a5bb4f /src/asciideck_parser.erl
parent6506afbce640d14ea772497839f45322cbdf0531 (diff)
downloadasciideck-074e21e93abf0eec59973cc35c9d2755d4a921f9.tar.gz
asciideck-074e21e93abf0eec59973cc35c9d2755d4a921f9.tar.bz2
asciideck-074e21e93abf0eec59973cc35c9d2755d4a921f9.zip
Fix an issue in Ranch manual
Solution is a hack for now, unfortunately.
Diffstat (limited to 'src/asciideck_parser.erl')
-rw-r--r--src/asciideck_parser.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/asciideck_parser.erl b/src/asciideck_parser.erl
index 7d81112..9755d29 100644
--- a/src/asciideck_parser.erl
+++ b/src/asciideck_parser.erl
@@ -195,8 +195,13 @@ p1_ll_glob([{LN, <<"+">>}|Tail], Acc) ->
p1_ll_glob(Tail, [{LN, <<>>}|Acc]);
p1_ll_glob([{LN, <<" ", Line/bits>>}|Tail], Acc) ->
p1_ll_glob([{LN, trim_ws(Line)}|Tail], Acc);
-p1_ll_glob([Line|Tail], Acc) ->
- p1_ll_glob(Tail, [Line|Acc]).
+p1_ll_glob(Lines=[Line={LN, Text}|Tail], Acc) ->
+ case binary:split(<< Text/binary, $\s >>, <<":: ">>) of
+ [_, _] ->
+ {Lines, lists:reverse([{LN, <<>>}|Acc])};
+ _ ->
+ p1_ll_glob(Tail, [Line|Acc])
+ end.
p1_text(Lines=[{LN, Line}|Tail], AST, St) ->
case binary:split(<< Line/binary, $\s >>, <<":: ">>) of