From ced166dc18424d367bbad18485f02c2627dfb6d4 Mon Sep 17 00:00:00 2001 From: Niklas Fasching Date: Mon, 17 Dec 2018 01:14:08 +0100 Subject: [PATCH] Fix inline parseLineBreak: Handle end of input --- org/inline.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org/inline.go b/org/inline.go index 9979af1..e11fd45 100644 --- a/org/inline.go +++ b/org/inline.go @@ -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} }