Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexOutOfBoundsException with markdown image #753

Closed
blueyed opened this issue Feb 25, 2017 · 2 comments
Closed

IndexOutOfBoundsException with markdown image #753

blueyed opened this issue Feb 25, 2017 · 2 comments
Assignees
Labels

Comments

@blueyed
Copy link

blueyed commented Feb 25, 2017

With a README.md file as follows, a IndexOutOfBounds exception is thrown:

#[![Neomake](https://cloud.githubusercontent.com/assets/111942/22717189/9e3e1760-ed67-11e6-94c5-e8955869d6d0.png)](#neomake)
[2017-02-25 16:56:39.155][INFO ] cc.redpen.Main - Configuration file: /opt/redpen/conf/redpen-conf-en.xml
[2017-02-25 16:56:39.159][INFO ] cc.redpen.config.ConfigurationLoader - Loading config from specified config file: "/opt/redpen/conf/redpen-conf-en.xml"
[2017-02-25 16:56:39.168][INFO ] cc.redpen.config.ConfigurationLoader - Succeeded to load configuration file
[2017-02-25 16:56:39.168][INFO ] cc.redpen.config.ConfigurationLoader - Language is set to "en"
[2017-02-25 16:56:39.168][WARN ] cc.redpen.config.ConfigurationLoader - No variant configuration...
[2017-02-25 16:56:39.169][INFO ] cc.redpen.config.ConfigurationLoader - No "symbols" block found in the configuration
[2017-02-25 16:56:39.171][INFO ] cc.redpen.config.SymbolTable - Default symbol settings are loaded
[2017-02-25 16:56:39.227][INFO ] cc.redpen.parser.SentenceExtractor - "[., ?, !]" are added as a end of sentence characters
[2017-02-25 16:56:39.227][INFO ] cc.redpen.parser.SentenceExtractor - "[', "]" are added as a right quotation characters
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.rangeCheck(ArrayList.java:653)
	at java.util.ArrayList.get(ArrayList.java:429)
	at cc.redpen.parser.markdown.ToFileContentSerializer.appendSection(ToFileContentSerializer.java:201)
	at cc.redpen.parser.markdown.ToFileContentSerializer.visit(ToFileContentSerializer.java:253)
	at org.pegdown.ast.HeaderNode.accept(HeaderNode.java:55)
	at cc.redpen.parser.markdown.ToFileContentSerializer.visitChildren(ToFileContentSerializer.java:74)
	at cc.redpen.parser.markdown.ToFileContentSerializer.visit(ToFileContentSerializer.java:313)
	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:127)
	at cc.redpen.Main.run(Main.java:163)
	at cc.redpen.Main.main(Main.java:60)

I am using redpen 1.7.6-1 from Arch Linux' AUR.

@takahi-i
Copy link
Member

takahi-i commented Mar 1, 2017

Thank for the valuable report @blueyed. I will look into the failure.

@takahi-i
Copy link
Member

takahi-i commented Mar 1, 2017

I made the hot fix for this problem in #755. Hopefully this work for you.

@takahi-i takahi-i closed this as completed Mar 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants