Infragistics / livewire

A simple web content editor built with Electron
https://waffle.io/infragistics/livewire
19 stars 9 forks source link

Support include:: Macro #46

Closed craigshoemaker closed 8 years ago

craigshoemaker commented 8 years ago

The implementation for the include:: macro (either get the native implementation to work or re-implement)

Related to the same issue in Tripwire

Comments

For some reason the include:: macro does not work out-of-the-box in Livewire. My guess is that there is a bug somewhere in asciidoctor.js during translation from Ruby to JavaScript. (Note: The macro does work in the Brackets AsciiDoc plugin.)

It may be easiest to simply examine files for the existence of the macro and then replace the macro syntax with the contents of included files after running the AsciiDoc conversion. This approach has the added benefit of not interfering with the AsciiDoc parsing should it begin to work correctly with updated versions of asciidoctor.js.

There are a few other tweaks to the converted text that are done post-conversion, so this would be a good place to add a custom implementation if necessary.

If a custom implementation is require please be sure to implement it in it's own module as we'll need the same functionality in the Tripwire build tasks to convert AsciiDoc to HTML.