question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nonempty text is not covered by block in AsciiDoc formatter

See original GitHub issue

While editing a long asciidoctor document with many many many asciidoctor features, I noticed the plugin raised this stack trace, I’m not sure when or which part of the document. I suppose it in one of the includes, but I’m not sure where.

nonempty text is not covered by block in #AsciiDoc #formatter
Range: [10551,10554], text fragment: [10551,10554]


com.intellij.diagnostic.PluginException:  [Plugin: org.asciidoctor.intellij.asciidoc]
	at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:447)
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:58)
	at com.intellij.formatting.RangesAssert.assertInvalidRanges(RangesAssert.java:59)
	at com.intellij.formatting.WhiteSpace.changeEndOffset(WhiteSpace.java:126)
	at com.intellij.formatting.InitialInfoBuilder.buildFrom(InitialInfoBuilder.java:141)
	at com.intellij.formatting.InitialInfoBuilder.doIteration(InitialInfoBuilder.java:221)
	at com.intellij.formatting.InitialInfoBuilder.iteration(InitialInfoBuilder.java:118)
	at com.intellij.formatting.engine.WrapBlocksState.doIteration(WrapBlocksState.java:47)
	at com.intellij.formatting.engine.State.iteration(State.java:25)
	at com.intellij.formatting.engine.StateProcessor.iteration(StateProcessor.java:26)
	at com.intellij.formatting.FormatProcessor.iteration(FormatProcessor.java:107)
	at com.intellij.formatting.FormatterImpl.buildProcessorAndWrapBlocks(FormatterImpl.java:428)
	at com.intellij.formatting.FormatterImpl.buildProcessorAndWrapBlocks(FormatterImpl.java:405)
	at com.intellij.formatting.FormatterImpl.getLineIndent(FormatterImpl.java:487)
	at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl$4.doPerform(CodeStyleManagerImpl.java:426)
	at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl$4.doPerform(CodeStyleManagerImpl.java:418)
	at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerRunnable.perform(CodeStyleManagerRunnable.java:103)
	at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.getLineIndent(CodeStyleManagerImpl.java:428)
	at com.intellij.psi.impl.source.codeStyle.lineIndent.FormatterBasedLineIndentProvider.getLineIndent(FormatterBasedLineIndentProvider.java:42)
	at com.intellij.psi.impl.source.codeStyle.CodeStyleFacadeImpl.getLineIndent(CodeStyleFacadeImpl.java:70)
	at com.intellij.codeInsight.editorActions.EnterHandler.adjustLineIndentNoCommit(EnterHandler.java:302)
	at com.intellij.codeInsight.editorActions.EnterHandler$DoEnterAction.run(EnterHandler.java:422)
	at com.intellij.codeInsight.editorActions.EnterHandler.executeWriteActionInner(EnterHandler.java:154)
	at com.intellij.codeInsight.editorActions.EnterHandler.lambda$executeWriteAction$0(EnterHandler.java:65)
	at com.intellij.psi.impl.source.PostprocessReformattingAspect.lambda$disablePostprocessFormattingInside$1(PostprocessReformattingAspect.java:101)
	at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:109)
	at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:100)
	at com.intellij.codeInsight.editorActions.EnterHandler.executeWriteAction(EnterHandler.java:64)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:51)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:976)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.doExecute(EditorWriteActionHandler.java:64)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:201)
	at com.intellij.codeInsight.template.impl.editorActions.EnterHandler.executeWriteAction(EnterHandler.java:49)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:51)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:976)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.doExecute(EditorWriteActionHandler.java:64)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$null$2(EditorActionHandler.java:191)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doIfEnabled(EditorActionHandler.java:88)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$3(EditorActionHandler.java:190)
	at com.intellij.openapi.editor.impl.CaretModelImpl.lambda$runForEachCaret$3(CaretModelImpl.java:298)
	at com.intellij.openapi.editor.impl.CaretModelImpl.doWithCaretMerging(CaretModelImpl.java:407)
	at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:307)
	at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:282)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:188)
	at com.intellij.xdebugger.impl.actions.handlers.XDebuggerSmartStepIntoHandler$SmartStepEditorActionHandler.doExecute(XDebuggerSmartStepIntoHandler.java:404)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$4(EditorActionHandler.java:198)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doIfEnabled(EditorActionHandler.java:88)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:197)
	at com.intellij.openapi.editor.actionSystem.EditorAction.lambda$actionPerformed$0(EditorAction.java:98)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:220)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:178)
	at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:107)
	at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:82)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:280)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:609)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$processAction$3(IdeKeyEventDispatcher.java:670)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:669)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:619)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:516)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:470)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:219)
	at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:896)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:841)
	at com.intellij.ide.IdeEventQueue.lambda$null$8(IdeEventQueue.java:449)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:741)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:502)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

AsciiDoc Plugin Version: 0.30.61 IDE Name and Version: IntelliJ IDEA 2020.1.1 Preview (Ultimate Edition) Build #IU-201.7223.18, built on April 16, 2020

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ahus1commented, Apr 23, 2020

I tracked this down to a lexer issue where a single “+” followed by a whitespace would be counted towards a whitespace. A following re-format could then eliminate the plus as it recognized it as whitespace. An assertion in IntelliJ reported this situation with the error message shown above.

This is fixed in pre-release 0.30.63. Please let me know if you still observe this with the new release.

The new pre-release of the plugin is available from GitHub releases and the IntelliJ AsciiDoc EAP repository.

1reaction
ahus1commented, Apr 22, 2020

Thanks for reporting this. It might take some time for me to figure out the reason. None of the classes is in the stack trace 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

AsciiDoc Syntax Quick Reference
The quick reference for common AsciiDoc document and text formatting markup. ... The header may not contain any empty lines and must be...
Read more >
AsciiDoc Frequently Asked Questions
How can I format text inside a listing block? By default only specialcharacters and callouts are substituted in listing blocks; you can add ......
Read more >
asciidoc.adoc
NOTE : This is not a note as there are spaces between `NOTE` and `:`. NOTE: This is not a note as it...
Read more >
Text formatting
A semantically-tagged text with span is not normally rendered any different to ... Metanorma AsciiDoc also recognises HTML and XML character references, ...
Read more >
AsciiDoc Syntax Quick Reference
... quick reference for the common AsciiDoc document and text formatting markup. ... characters on the first (non-blank) line between the block delimiters....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found