asciidoctor / atom-asciidoc-preview

⚛ AsciiDoc preview for the Atom editor.
https://atom.io/packages/asciidoc-preview
MIT License
141 stars 42 forks source link

2 Passthroughs on 1 line crashes preview #293

Closed Tejeev closed 5 years ago

Tejeev commented 5 years ago

Description

It appears the inline passthrough crash resolved in asciidoctor #3089 / pull #3091 (#3089 fix crash caused by an inline passthrough with the macros sub #3091) is still not resolved in the preview. Placing two passthroughs on the same line causes the crash. You can work around by moving the second passthrough to the next line.

Stacktrace

Asciidoctor.js error

Rendering error Please verify your document syntax.

Details: []: undefined method `[]' for nil

[code: undefined, errno: undefined, syscall: undefined]

[]: undefined method `[]' for nil
    at $NilClass.$$method_missing (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/opal-runtime/src/opal.js:3910:56)
    at $NilClass.method_missing_stub (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/opal-runtime/src/opal.js:1299:35)
    at TMP_13 (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/asciidoctor.js/dist/node/asciidoctor.js:2927:53)
    at String.$$gsub (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/opal-runtime/src/opal.js:7616:26)
    at Opal.send (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/opal-runtime/src/opal.js:1660:19)
    at /home/tejeev/.atom/packages/asciidoc-preview/node_modules/asciidoctor.js/dist/node/asciidoctor.js:2923:16
    at $Block.$$restore_passthroughs (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/asciidoctor.js/dist/node/asciidoctor.js:2941:14)
    at TMP_44 (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/asciidoctor.js/dist/node/asciidoctor.js:3633:27)
    at String.$$gsub (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/opal-runtime/src/opal.js:7616:26)
    at Opal.send (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/opal-runtime/src/opal.js:1660:19)
    at $Block.$$sub_macros (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/asciidoctor.js/dist/node/asciidoctor.js:3594:18)
    at /home/tejeev/.atom/packages/asciidoc-preview/node_modules/asciidoctor.js/dist/node/asciidoctor.js:2660:66
    at TMP_2 (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/asciidoctor.js/dist/node/asciidoctor.js:2668:91)
    at Object.Opal.yield1 (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/opal-runtime/src/opal.js:1441:14)
    at Array.$$each (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/opal-runtime/src/opal.js:13080:26)
    at Opal.send (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/opal-runtime/src/opal.js:1660:19)
    at $Block.$$apply_subs (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/asciidoctor.js/dist/node/asciidoctor.js:2644:9)
    at /home/tejeev/.atom/packages/asciidoc-preview/node_modules/asciidoctor.js/dist/node/asciidoctor.js:5988:56
    at $Block.$$content (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/asciidoctor.js/dist/node/asciidoctor.js:6008:23)
    at $Html5Converter.$$paragraph (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/asciidoctor.js/dist/node/asciidoctor.js:16375:70)
    at $Html5Converter.$$__send__ (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/opal-runtime/src/opal.js:3705:21)
    at Object.Opal.send (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/opal-runtime/src/opal.js:1660:19)
    at $Html5Converter.alias (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/opal-runtime/src/opal.js:1850:19)
    at $Html5Converter.$$convert (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/asciidoctor.js/dist/node/asciidoctor.js:6215:23)
    at $Block.$$convert (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/asciidoctor.js/dist/node/asciidoctor.js:5192:34)
    at TMP_8 (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/asciidoctor.js/dist/node/asciidoctor.js:5206:20)
    at Object.Opal.yield1 (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/opal-runtime/src/opal.js:1441:14)
    at Array.$$collect (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/opal-runtime/src/opal.js:12731:26)
    at Object.Opal.send (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/opal-runtime/src/opal.js:1660:19)
    at Array.alias (/home/tejeev/.atom/packages/asciidoc-preview/node_modules/opal-runtime/src/opal.js:1850:19)

Syntax example

addon (to allow for tracking of slack side conversations 
footnote:[pass:a,p,m[Side Conversations - Support Professional plan +addon +
https://support.zendesk.com/hc/en-us/articles/360002115087#topic_mt1_rng_gfb]])
and/or BubbleIQ (a more fleshed out integration
footnote:[pass:a,p,m[BubbleIQ app + 
https://support.zendesk.com/hc/en-us/articles/360002115087#topic_mt1_rng_gfb]] )