Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Positional Attributes are not honoured with Asciidoctor 2.0.0 #219

Closed
robertpanzer opened this issue Mar 23, 2019 · 6 comments
Closed

Positional Attributes are not honoured with Asciidoctor 2.0.0 #219

robertpanzer opened this issue Mar 23, 2019 · 6 comments
Milestone

Comments

@robertpanzer
Copy link
Member

To reproduce install asciidoctor 2.0.0 and asciidoctor-diagram 1.5.15.
Then create the following document:

= Test

Test

== Test

[plantuml,test,svg]
----
A --> B
----

Render the document with asciidoctor -r asciidoctor-diagram test.adoc.
Then check the resulting html.
It contains a reference to a png with a random name instead of test.svg:

<img src="diag-7f08224f605e107120b662e8be428889.png" alt="diag 7f08224f605e107120b662e8be428889" width="78" height="111">

I guess the reason for this is that the option for positional attributes was renamed from :pos_attrs to :positional_attrs and that it has to be fixed here:

subclass.option :pos_attrs, ['target', 'format']

and
subclass.option :pos_attrs, ['target', 'format']

@pepijnve
Copy link
Member

This is caused by a very last minute change in asciidoctor 2.0.0 indeed. I'll get a compatibility fix in place asap.

pepijnve added a commit that referenced this issue Mar 23, 2019
pepijnve added a commit that referenced this issue Mar 23, 2019
@pepijnve pepijnve added this to the 1.5.16 milestone Mar 23, 2019
@pepijnve
Copy link
Member

Fixed in 1.5.16

@mojavelinux
Copy link
Member

Argh, I didn't mean to introduce this breaking change. I checked the builds, but I got duped by the queue of builds. Travis was reporting the build as green, but the build that would fail was still pending.

Now I realize that existing code could be depending on this option name, so I'm going to put a patch in 2.0.1. I don't want to force existing extensions to change.

@mojavelinux
Copy link
Member

There's a far simpler way to solve this problem. Just register both options.

subclass.option :pos_attrs, ['target', 'format']
subclass.option :positional_attrs, ['target', 'format']

@pepijnve
Copy link
Member

@mojavelinux no worries; we spotted it quickly enough. I went for a really quick fix. I’ll come up with something more elegant for diagram v2 (basically the server branch I’m working on).

@mojavelinux
Copy link
Member

My plan is for you to be able to remove this fix once 2.0.1 is out. Users will have to use 2.0.1 instead of 2.0.0, but I think that's a reasonable expectation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants