Fix parsing of regular links enclosed in []
This commit is contained in:
parent
905648c34b
commit
fb837e04af
4 changed files with 10 additions and 3 deletions
|
@ -197,7 +197,7 @@ func (d *Document) parseAutoLink(input string, start int) (int, int, Node) {
|
|||
}
|
||||
|
||||
func (d *Document) parseRegularLink(input string, start int) (int, Node) {
|
||||
if len(input[start:]) == 0 || input[start+1] != '[' {
|
||||
if len(input[start:]) < 2 || input[start+1] != '[' || input[start+2] == '[' {
|
||||
return 0, nil
|
||||
}
|
||||
input = input[start:]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue