Fix inline parseLineBreak: Handle end of input
This commit is contained in:
parent
ba3cf9f948
commit
ced166dc18
1 changed files with 1 additions and 1 deletions
|
@ -80,7 +80,7 @@ func (d *Document) parseInline(input string) (nodes []Node) {
|
|||
|
||||
func (d *Document) parseLineBreak(input string, start int) (int, Node) {
|
||||
i := start
|
||||
for ; input[i] == '\n'; i++ {
|
||||
for ; i < len(input) && input[i] == '\n'; i++ {
|
||||
}
|
||||
return i - start, LineBreak{i - start}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue