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

Unmatched endifs when splitting long ifdef/endif blocks #66

Closed handreyrc closed 4 years ago

handreyrc commented 4 years ago

Splitting long blocks of ifdef/endif with the parameter “-a KOGITO-ENT=true” is resulting in unmatched endif statements preventing ccutil from building the content.

Check the source file: {source}/titles-enterprise/kogito-creating-running/doc-content/kogito-docs/src/main/asciidoc/creating-running/chap-kogito-creating-running.adoc Go straight to the end of the file locate the endif right after the “--Additional Resources” block. The opening ifdef is located at line 1219.

Steps to reproduce:

Actual output: Path: assemblies/assembly-kogito-creating-running.adoc == Additional resources * {URL_DEPLOYING_ONOPENSHIFT}[{DEPLOYING_ONOPENSHIFT}] * {URL_DECISIONSERVICES}[{DECISIONSERVICES}] * {URL_PROCESSSERVICES}[{PROCESSSERVICES}] * {URL_CONFIGURINGKOGITO}[{CONFIGURINGKOGITO}] endif::[]

Expected output: Following the Target reference Path: assemblies/assembly-kogito-creating-running.adoc ifdef::KOGITO-ENT[] == Additional resources * {URL_DEPLOYING_ONOPENSHIFT}[{DEPLOYING_ONOPENSHIFT}] * {URL_DECISIONSERVICES}[{DECISIONSERVICES}] * {URL_PROCESSSERVICES}[{PROCESSSERVICES}] * {URL_CONFIGURINGKOGITO}[{CONFIGURINGKOGITO}] endif::[]

LightGuard commented 4 years ago

Yep, I know about this one. I don’t have a solution just yet.

Sent from my iPhone

On Jul 11, 2020, at 11:19, Handreyrc notifications@github.com wrote:

 Splitting long blocks of ifdef/endif with the parameter “-a KOGITO-ENT=true” is resulting in unmatched endif statements preventing ccutil from building the content.

Check the source file: {source}/titles-enterprise/kogito-creating-running/doc-content/kogito-docs/src/main/asciidoc/creating-running/chap-kogito-creating-running.adoc Go straight to the end of the file locate the endif right after the “--Additional Resources” block. The opening ifdef is located at line 1219.

Steps to reproduce:

run the splitter java -jar target/asciidoc-splitter-1.0-SNAPSHOT.jar -s {source} -o {output} -i index.adoc -a KOGITO-ENT=true go to {output}/titles-enterprise/kogito-creating-running run ccutil ccutil compile --lang en-US --open Check ccutil output asciidoctor: ERROR: assemblies/modules/creating-running/con-kogito-quarkus-springboot.adoc: line 14: unmatched macro: endif::[] asciidoctor: ERROR: assemblies/assembly-kogito-creating-running.adoc: line 37: unmatched macro: endif::[] gio: file:///home/hcunha/kie-docs/output/titles-enterprise/kogito-creating-running/build/tmp/en-US/html-single/index.html: Error when getting information for file “/home/hcunha/kie-docs/output/titles-enterprise/kogito-creating-running/build/tmp/en-US/html-single/index.html”: No such file or directory Note: Both errors seem to have the same root cause. Actual output: Path: assemblies/assembly-kogito-creating-running.adoc == Additional resources

{URL_DEPLOYING_ON_OPENSHIFT}[{DEPLOYING_ON_OPENSHIFT}] {URL_DECISION_SERVICES}[{DECISION_SERVICES}] {URL_PROCESS_SERVICES}[{PROCESS_SERVICES}] {URL_CONFIGURING_KOGITO}[{CONFIGURING_KOGITO}] endif::[] Expected output: Following the Target reference Path: assemblies/assembly-kogito-creating-running.adoc ifdef::KOGITO-ENT[] == Additional resources

{URL_DEPLOYING_ON_OPENSHIFT}[{DEPLOYING_ON_OPENSHIFT}] {URL_DECISION_SERVICES}[{DECISION_SERVICES}] {URL_PROCESS_SERVICES}[{PROCESS_SERVICES}] {URL_CONFIGURING_KOGITO}[{CONFIGURING_KOGITO}] endif::[] — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.