Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash as a result of maybe becoming a reserved word #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/markdown.erl
Original file line number Diff line number Diff line change
Expand Up @@ -602,12 +602,12 @@ is_block_tag(_Other) -> false.
type_underscore(List) ->
case type_underscore1(trim_right(List)) of
hr -> {hr, List};
maybe -> {type_underscore2(List), List}
'maybe' -> {type_underscore2(List), List}
end.

type_underscore1([]) -> hr;
type_underscore1([{{md, underscore}, _} | T]) -> type_underscore1(T);
type_underscore1(_List) -> maybe.
type_underscore1(_List) -> 'maybe'.

type_underscore2(List) ->
case trim_right(List) of % be permissive of trailing spaces
Expand All @@ -621,7 +621,7 @@ type_star(List) ->
Trim = trim_right(List),
case type_star1(Trim) of % be permssive of trailing spaces
hr -> {hr, trim_right(Trim)};
maybe -> Type = type_star2(List),
'maybe' -> Type = type_star2(List),
% if it is a normal line we prepend it with a special
% non-space filling white space character
case Type of
Expand All @@ -632,7 +632,7 @@ type_star(List) ->

type_star1([]) -> hr;
type_star1([{{md, star}, _} | T]) -> type_star1(T);
type_star1(_List) -> maybe.
type_star1(_List) -> 'maybe'.

type_star2(List) ->
case trim_right(List) of
Expand Down