AsciidocFX icon indicating copy to clipboard operation
AsciidocFX copied to clipboard

Error in including plantuml files that has !include statements

Open carun opened this issue 5 years ago • 0 comments
trafficstars

Information

AsciidocFX Version: 1.7.3 OS: Windows 64 bit

Something.adoc

== Introduction

This is an asciidoc document.

[plantuml, Text, png]
----
include::file1.puml[]
----

file1.puml

@startuml Sequence
title Example
!include internal-header.iuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
@enduml

header.iuml

autonumber "<font color=teal><b> 00."
skinparam defaultFontName Segoe UI
skinparam roundcorner 10
skinparam sequenceLifeLineBackgroundColor pink
skinparam sequenceMessageAlign center

Expected Output

HTML file with correct sequence diagram.

Actual Output

image

Miscellaneous

Related issue in Asciidoctor-diagrams: https://github.com/asciidoctor/asciidoctor-diagram/issues/291

Here is a repo to reproduce https://github.com/carun/asciidoctor-diagram-issue-291.

I just validated the generated HTML and it seems to be fine with asciidoctor command line.

2020-09-21 09:53:01 /var/tmp/asciidoctor-diagram-issue-291 (master)
$ asciidoctor -b html5 Something.adoc -r asciidoctor-diagram
asciidoctor: FAILED: 'asciidoctor-diagram' could not be loaded
  Use --trace for backtrace
2020-09-21 09:54:49 /var/tmp/asciidoctor-diagram-issue-291 (master)
$ gem search asciidoctor-diagram

*** REMOTE GEMS ***

asciidoctor-diagram (2.0.3, 1.2.1 java)
asciidoctor-diagram-cacoo (0.2.2)
asciidoctor-diagram-eralchemy (0.1.0)
asciidoctor-diagram-office (0.1.2)
asciidoctor-diagram-stupid (0.1.0)
2020-09-21 09:55:17 /var/tmp/asciidoctor-diagram-issue-291 (master)
$ sudo gem install asciidoctor-diagram
Fetching asciidoctor-diagram-2.0.3.gem
Successfully installed asciidoctor-diagram-2.0.3
Parsing documentation for asciidoctor-diagram-2.0.3
Installing ri documentation for asciidoctor-diagram-2.0.3
Done installing documentation for asciidoctor-diagram after 0 seconds
1 gem installed
2020-09-21 09:55:28 /var/tmp/asciidoctor-diagram-issue-291 (master)
$ asciidoctor -b html5 Something.adoc -r asciidoctor-diagram
2020-09-21 09:55:41 /var/tmp/asciidoctor-diagram-issue-291 (master)
$

image

carun avatar Sep 21 '20 20:09 carun

My Code is OK like this

file1.puml

@startuml
!include header.iuml
title Example
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
@enduml
  • @startuml Sequence , I remove Sequence
  • !include internal-header.iuml , I change to !include header.iuml

life888888 avatar Mar 16 '22 12:03 life888888