{"action":"created","issue":{"url":"https://api.github.com/repos/vsch/idea-multimarkdown/issues/109","labels_url":"https://api.github.com/repos/vsch/idea-multimarkdown/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/vsch/idea-multimarkdown/issues/109/comments","events_url":"https://api.github.com/repos/vsch/idea-multimarkdown/issues/109/events","html_url":"https://github.com/vsch/idea-multimarkdown/issues/109","id":123981590,"number":109,"title":"Crash in CLion with 1.3.1 rendering simple link","user":{"login":"tamboril","id":16260733,"avatar_url":"https://avatars.githubusercontent.com/u/16260733?v=3","gravatar_id":"","url":"https://api.github.com/users/tamboril","html_url":"https://github.com/tamboril","followers_url":"https://api.github.com/users/tamboril/followers","following_url":"https://api.github.com/users/tamboril/following{/other_user}","gists_url":"https://api.github.com/users/tamboril/gists{/gist_id}","starred_url":"https://api.github.com/users/tamboril/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamboril/subscriptions","organizations_url":"https://api.github.com/users/tamboril/orgs","repos_url":"https://api.github.com/users/tamboril/repos","events_url":"https://api.github.com/users/tamboril/events{/privacy}","received_events_url":"https://api.github.com/users/tamboril/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-27T14:34:44Z","updated_at":"2015-12-27T16:29:43Z","closed_at":null,"body":"After switching to JavaFX and trying another page, it crashed again.  \r\n\r\nI can't seem to format this link so that it doesn't cause the error:\r\n\r\n    [ABC](doc/news.md)\r\n\r\nHere is the stack:\r\n\r\n    String index out of range: -4\r\n    java.lang.StringIndexOutOfBoundsException: String index out of range: -4\r\n\tat java.lang.String.substring(String.java:1919)\r\n\tat kotlin.text.StringsKt__StringsJVMKt.substring(StringsJVM.kt:136)\r\n\tat kotlin.text.StringsKt.substring(Unknown Source)\r\n\tat com.vladsch.idea.multimarkdown.util.GitHubLinkMatcher.computeMatchText(GitHubLinkMatcher.kt:222)\r\n\tat com.vladsch.idea.multimarkdown.util.GitHubLinkMatcher$isOnlyCompletionMatchValid$2.invoke(GitHubLinkMatcher.kt:96)\r\n\tat com.vladsch.idea.multimarkdown.util.GitHubLinkMatcher$isOnlyCompletionMatchValid$2.invoke(GitHubLinkMatcher.kt:29)\r\n\tat kotlin.SynchronizedLazyImpl.getValue(Lazy.kt:125)\r\n\tat kotlin.LazyKt.getValue(Lazy.kt:77)\r\n\tat com.vladsch.idea.multimarkdown.util.GitHubLinkMatcher.isOnlyCompletionMatchValid(GitHubLinkMatcher.kt)\r\n\tat com.vladsch.idea.multimarkdown.util.GitHubLinkResolver.getMatchedRefs(GitHubLinkResolver.kt:215)\r\n\tat com.vladsch.idea.multimarkdown.util.GitHubLinkResolver.resolve(GitHubLinkResolver.kt:154)\r\n\tat com.vladsch.idea.multimarkdown.editor.MultiMarkdownLinkRenderer.getLinkTarget(MultiMarkdownLinkRenderer.java:78)\r\n\tat com.vladsch.idea.multimarkdown.editor.MultiMarkdownLinkRenderer.renderLink(MultiMarkdownLinkRenderer.java:98)\r\n\tat com.vladsch.idea.multimarkdown.editor.MultiMarkdownLinkRenderer.render(MultiMarkdownLinkRenderer.java:124)\r\n\tat org.pegdown.ToHtmlSerializer.visit(ToHtmlSerializer.java:215)\r\n\tat org.pegdown.ast.ExpLinkNode.accept(ExpLinkNode.java:35)\r\n\tat org.pegdown.ToHtmlSerializer.visitChildrenSkipFirst(ToHtmlSerializer.java:606)\r\n\tat org.pegdown.ToHtmlSerializer.visitChildren(ToHtmlSerializer.java:594)\r\n\tat org.pegdown.ToHtmlSerializer.visit(ToHtmlSerializer.java:579)\r\n\tat org.pegdown.ast.SuperNode.accept(SuperNode.java:43)\r\n\tat org.pegdown.ToHtmlSerializer.visitChildrenSkipFirst(ToHtmlSerializer.java:606)\r\n\tat org.pegdown.ToHtmlSerializer.visitChildren(ToHtmlSerializer.java:594)\r\n\tat org.pegdown.ToHtmlSerializer.printTag(ToHtmlSerializer.java:620)\r\n\tat org.pegdown.ToHtmlSerializer.printBreakBeforeTag(ToHtmlSerializer.java:627)\r\n\tat org.pegdown.ToHtmlSerializer.visit(ToHtmlSerializer.java:315)\r\n\tat org.pegdown.ast.ParaNode.accept(ParaNode.java:35)\r\n\tat org.pegdown.ToHtmlSerializer.visitChildrenSkipFirst(ToHtmlSerializer.java:606)\r\n\tat org.pegdown.ToHtmlSerializer.visitChildren(ToHtmlSerializer.java:594)\r\n\tat org.pegdown.ToHtmlSerializer.visit(ToHtmlSerializer.java:120)\r\n\tat org.pegdown.ast.RootNode.accept(RootNode.java:76)\r\n\tat org.pegdown.ToHtmlSerializer.toHtml(ToHtmlSerializer.java:90)\r\n\tat com.vladsch.idea.multimarkdown.editor.resources.JavaFxHtmlGenerator.toHtml(JavaFxHtmlGenerator.kt:54)\r\n\tat com.vladsch.idea.multimarkdown.editor.MarkdownPreviewFileEditor$HtmlUpdater.run(MarkdownPreviewFileEditor.kt:266)\r\n\tat com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)"},"comment":{"url":"https://api.github.com/repos/vsch/idea-multimarkdown/issues/comments/167424474","html_url":"https://github.com/vsch/idea-multimarkdown/issues/109#issuecomment-167424474","issue_url":"https://api.github.com/repos/vsch/idea-multimarkdown/issues/109","id":167424474,"user":{"login":"tamboril","id":16260733,"avatar_url":"https://avatars.githubusercontent.com/u/16260733?v=3","gravatar_id":"","url":"https://api.github.com/users/tamboril","html_url":"https://github.com/tamboril","followers_url":"https://api.github.com/users/tamboril/followers","following_url":"https://api.github.com/users/tamboril/following{/other_user}","gists_url":"https://api.github.com/users/tamboril/gists{/gist_id}","starred_url":"https://api.github.com/users/tamboril/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamboril/subscriptions","organizations_url":"https://api.github.com/users/tamboril/orgs","repos_url":"https://api.github.com/users/tamboril/repos","events_url":"https://api.github.com/users/tamboril/events{/privacy}","received_events_url":"https://api.github.com/users/tamboril/received_events","type":"User","site_admin":false},"created_at":"2015-12-27T16:29:43Z","updated_at":"2015-12-27T16:29:43Z","body":"The file above the project root is there because there are cpp, java, ..., etc., which are project roots for different JetBrains IDE's.  Everything is in one repo, though; so there has to be a readme.md at the top (so it shows up automatically in GitHub or Visual Studio Online), and that is necessarily above the language- and IDE-specific subdirectories.\r\n\r\nI ran it with a [trace](https://github.com/vsch/idea-multimarkdown/files/72734/t.zip), which is attached.  Thank you for your attention to this."}}