diff options
author | Loïc Hoguin <[email protected]> | 2016-11-04 19:45:25 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-11-04 19:45:25 +0200 |
commit | 26b9f935e2abcf9ba79ee78b918a556bc2290190 (patch) | |
tree | 082d47d7bf49fee273e2240619d908fce8f3284d /src | |
parent | f701e5f7a7a7111743c5c30b1c5e30220761bb50 (diff) | |
download | asciideck-26b9f935e2abcf9ba79ee78b918a556bc2290190.tar.gz asciideck-26b9f935e2abcf9ba79ee78b918a556bc2290190.tar.bz2 asciideck-26b9f935e2abcf9ba79ee78b918a556bc2290190.zip |
Unescape pipes when parsing table cells
Diffstat (limited to 'src')
-rw-r--r-- | src/asciideck_parser.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/asciideck_parser.erl b/src/asciideck_parser.erl index 93efc41..8f4f558 100644 --- a/src/asciideck_parser.erl +++ b/src/asciideck_parser.erl @@ -129,8 +129,8 @@ p1_table(Tail, AST, St, LN) -> %% @todo Strip whitespace at the beginning of the cell if on the same line. p1_cell(Tail=[{_, NextLine}|_], AST0, St, LN, Text) -> case p1_cell_split(Text, <<>>) of - [_] -> - AST1 = [nl, cell(p1([{LN, trim_ws(Text)}, {LN, <<>>}], [], St), ann(LN, St))|AST0], + [Cell] -> + AST1 = [nl, cell(p1([{LN, trim_ws(Cell)}, {LN, <<>>}], [], St), ann(LN, St))|AST0], AST = case NextLine of <<>> -> [nl|AST1]; _ -> AST1 @@ -143,7 +143,7 @@ p1_cell(Tail=[{_, NextLine}|_], AST0, St, LN, Text) -> p1_cell_split(<<>>, Acc) -> [Acc]; p1_cell_split(<< $\\, $|, Rest/bits >>, Acc) -> - p1_cell_split(Rest, << Acc/binary, $\\, $| >>); + p1_cell_split(Rest, << Acc/binary, $| >>); p1_cell_split(<< $|, Rest/bits >>, Acc) -> [Acc, Rest]; p1_cell_split(<< C, Rest/bits >>, Acc) -> |