DocumentParser Exception on Empty Documents
*Created by: gdgib-bina*
The while loop on [`DocumentParser.java:480`](https://github.com/vsch/flexmark-java/blob/master/flexmark/src/main/java/com/vladsch/flexmark/internal/DocumentParser.java#L480) doesn't correctly handle 0-length input documents. It will eventually cause an `java.lang.ArrayIndexOutOfBoundsException` in `System.arrayCopy()` a few levels down due to the return value from `read(...)` being `-1`. In truth any document where `documentLength % 16384 == 0` will have this problem right now.
A `if (charsRead < 0) break;` statement after the read on line 481 will fix this.
If you need a test case you can simply run `Parser.builder().build().parseReader(new StringReader(""));`
issue