Skip to content

Commit

Permalink
fix: crystal 0.31 API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
icyleaf committed Sep 25, 2019
1 parent 873a782 commit e825ff6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/markd/parsers/block.cr
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ module Markd::Parser
@all_closed = (container == @oldtip)
@last_matched_container = container

matched_leaf = !container.type.paragraph? && RULES[container.type].accepts_lines? : Bool
matched_leaf = !container.type.paragraph? && RULES[container.type].accepts_lines?

while !matched_leaf
find_next_nonspace
Expand Down Expand Up @@ -167,7 +167,7 @@ module Markd::Parser
cont = cont.parent?
end

if RULES[container_type].accepts_lines? : Bool
if RULES[container_type].accepts_lines?
add_line

# if HtmlBlock, check for end condition
Expand Down
2 changes: 1 addition & 1 deletion src/markd/rules/code_block.cr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Markd::Rule
CODE_FENCE = /^`{3,}(?!.*`)|^~{3,}(?!.*~)/
CLOSING_CODE_FENCE = /^(?:`{3,}|~{3,})(?= *$)/

def match(parser : Parser, container : Node) : MatchValue : MatchValue
def match(parser : Parser, container : Node) : MatchValue
if !parser.indented &&
(match = parser.line[parser.next_nonspace..-1].match(CODE_FENCE))
# fenced
Expand Down
2 changes: 1 addition & 1 deletion src/markd/rules/heading.cr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Markd::Rule
ATX_HEADING_MARKER = /^\#{1,6}(?:[ \t]+|$)/
SETEXT_HEADING_MARKER = /^(?:=+|-+)[ \t]*$/

def match(parser : Parser, container : Node) : MatchValue : MatchValue
def match(parser : Parser, container : Node) : MatchValue
if match = match?(parser, ATX_HEADING_MARKER)
# ATX Heading matched
parser.advance_next_nonspace
Expand Down

0 comments on commit e825ff6

Please sign in to comment.