LightGuard / asciidoc-splitter

A splitter utility for helping create modular docs from chapter files.
BSD 2-Clause "Simplified" License
8 stars 8 forks source link

Support conversion of includes within source chaps to includes within target assemblies (aka assemblies of assemblies) #58

Closed sterobin closed 4 years ago

sterobin commented 4 years ago

Current behavior

The splitter converts explicit module content within a source chap file to an include in the target, but apparently doesn't convert includes in the source to the corresponding include in the target.

Example 1: The following includes from the source decision-services chap are includes to other whole chapters (aka assembly of assemblies) and are ignored and dropped during the split, so that all that is carried over is the single explicit module content section before the includes:

include::chap-kogito-using-dmn-models.adoc[]
include::chap-kogito-using-drl-rules.adoc[]
include::chap-kogito-using-spreadsheet-decision-tables.adoc[]
include::{asciidoc-dir}/decision-engine/chap-kogito-decision-engine.adoc[]

Example 2: The following include in the source process-services chap is an include that points to the reused/tagged module content, and is duplicated exactly as is over to the target instead of being converted to a corresponding include:

include::{asciidoc-dir}/creating-running/chap-kogito-creating-running.adoc[tags=ref-kogito-app-examples]

See also issue #57.

Desired behavior

Convert includes in the source content that point to other chapters like the following:

include::chap-kogito-using-dmn-models.adoc[]
include::chap-kogito-using-drl-rules.adoc[]
include::chap-kogito-using-spreadsheet-decision-tables.adoc[]
include::{asciidoc-dir}/decision-engine/chap-kogito-decision-engine.adoc[]

To corresponding includes in the target that point to the respective assemblies like the following:

include::assemblies/assembly-kogito-using-dmn-models.adoc[]
include::assemblies/assembly/kogito-using-drl-rules.adoc[]
include::assemblies/assembly-kogito-using-spreadsheet-decision-tables.adoc[]
include::assemblies/assembly-kogito-decision-engine.adoc[]

And convert an include for reused module content in the source like this:

include::{asciidoc-dir}/creating-running/chap-kogito-creating-running.adoc[tags=ref-kogito-app-examples]

To a standard module include in the target like this:

include::modules/creating-running/ref-kogito-app-examples.adoc[leveloffset=+1]