Fix mistake when open square bracket

When square bracket is opened and no tag is present before the end of text,
the text after this square bracket (and the square bracket) was not included
in the document node during the parsing