Crash: link to reference is nested in image when format is JSON
See original GitHub issueHow to repro
[][bar]
[bar]: bar
Save above doc as tmp.md
and run redpen -r json tmp.md
Log
[2017-12-12 13:15:45.717][INFO ] cc.redpen.Main - Configuration file: /usr/local/Cellar/redpen/1.10.0/libexec/conf/redpen-conf-en.xml [2017-12-12 13:15:45.723][INFO ] cc.redpen.config.ConfigurationLoader - Loading config from specified config file: "/usr/local/Cellar/redpen/1.10.0/libexec/conf/redpen-conf-en.xml" [2017-12-12 13:15:45.734][INFO ] cc.redpen.config.ConfigurationLoader - Succeeded to load configuration file [2017-12-12 13:15:45.734][INFO ] cc.redpen.config.ConfigurationLoader - Language is set to "en" [2017-12-12 13:15:45.734][WARN ] cc.redpen.config.ConfigurationLoader - No variant configuration... [2017-12-12 13:15:45.786][INFO ] cc.redpen.config.ConfigurationLoader - No "symbols" block found in the configuration [2017-12-12 13:15:45.789][INFO ] cc.redpen.config.SymbolTable - Default symbol settings are loaded [2017-12-12 13:15:45.792][INFO ] cc.redpen.parser.SentenceExtractor - "[., ?, !]" are added as a end of sentence characters [2017-12-12 13:15:45.792][INFO ] cc.redpen.parser.SentenceExtractor - "[', "]" are added as a right quotation characters [2017-12-12 13:15:46.101][WARN ] cc.redpen.parser.markdown.ToFileContentSerializer - Failed to add parent for a Section Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(ArrayList.java:418) at java.util.ArrayList.get(ArrayList.java:431) at cc.redpen.parser.markdown.ToFileContentSerializer.visit(ToFileContentSerializer.java:412) at org.pegdown.ast.RefLinkNode.accept(RefLinkNode.java:33) at cc.redpen.parser.markdown.ToFileContentSerializer.visitChildren(ToFileContentSerializer.java:74) at cc.redpen.parser.markdown.ToFileContentSerializer.visit(ToFileContentSerializer.java:452) at org.pegdown.ast.SuperNode.accept(SuperNode.java:43) at cc.redpen.parser.markdown.ToFileContentSerializer.visitChildren(ToFileContentSerializer.java:74) at cc.redpen.parser.markdown.ToFileContentSerializer.visit(ToFileContentSerializer.java:300) at org.pegdown.ast.ParaNode.accept(ParaNode.java:35) at cc.redpen.parser.markdown.ToFileContentSerializer.visitChildren(ToFileContentSerializer.java:74) at cc.redpen.parser.markdown.ToFileContentSerializer.visit(ToFileContentSerializer.java:315) at org.pegdown.ast.RootNode.accept(RootNode.java:51) at cc.redpen.parser.markdown.ToFileContentSerializer.toFileContent(ToFileContentSerializer.java:90) at cc.redpen.parser.MarkdownParser.parse(MarkdownParser.java:79) at cc.redpen.parser.BaseDocumentParser.parse(BaseDocumentParser.java:58) at cc.redpen.RedPen.parse(RedPen.java:131) at cc.redpen.Main.getDocuments(Main.java:221) at cc.redpen.Main.run(Main.java:196) at cc.redpen.Main.main(Main.java:60)
Environment
OS
macOS 10.12
redpen
v1.10.0 (installed via brew install
)
Java
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Working with JSON - Learn web development | MDN
In this article, we've given you a simple guide to using JSON in your programs, including how to create and parse JSON, and...
Read more >nested loop takes too long and almost crashes the browser
My app is retrieving json data. The json file have almost one thousand words with a strucuture like this: {"THEMES":{"THEME1":["ITEM1" ...
Read more >JSONObject - Android Developers
Creates a new JSONObject with name/value mappings from the JSON string. ... garbage collection determines that there are no more references to the...
Read more >JSON and serialization - Flutter documentation
How to use JSON with Flutter. ... Generating code for nested classes; Further references ... The following sample JSON implements a simple user...
Read more >Import Json to excel and export excel to Json (Updated 2022)
Extract it, open VBA code editor in excel (Alt + F11) and import the library as shown in the gif below. Add a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
After upgrading redpen via Homebrew, it backs to work fine now. Thank you for your quick fix 👍
I will release the new version of RedPen containing this hotfix soon.