Skip to content

Commit

Permalink
fix(parser): support spaces and tabs ahead of single line comment
Browse files Browse the repository at this point in the history
fixes bytesparadise#288

Signed-off-by: Xavier Coulon <[email protected]>
  • Loading branch information
xcoulon committed Feb 10, 2019
1 parent 2387309 commit ca317b9
Show file tree
Hide file tree
Showing 3 changed files with 10,347 additions and 10,150 deletions.
2 changes: 1 addition & 1 deletion pkg/parser/asciidoc-grammar.peg
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ CommentBlockLine <- (Alphanums / Spaces / (!CommentBlockDelimiter !EOL .){
return string(c.text), nil
}

SingleLineComment <- !CommentBlockDelimiter "//" content:(SingleLineCommentContent) EOL {
SingleLineComment <- !CommentBlockDelimiter WS* "//" content:(SingleLineCommentContent) EOL {
return types.NewSingleLineComment(content.(string))
}

Expand Down
Loading

0 comments on commit ca317b9

Please sign in to comment.