asciidoctor / asciidoctor-extensions-lab

A lab for testing and demonstrating Asciidoctor extensions. Please do not use this code in production. If you want to use one of these extensions in your application, create a new project, import the code, and distribute it as a RubyGem. You can then request to make it a top-level project under the Asciidoctor organization.
Other
104 stars 101 forks source link

Convert all inline example to use create_inline otherwise it gives "INFO: expected substitution value for custom inline macro to be of type Inline" #107

Closed cirosantilli closed 9 months ago

cirosantilli commented 4 years ago

Or if there is a better option than create_inline, demonstrate it.

Due to: https://github.com/asciidoctor/asciidoctor/issues/3176

With asdiidoctor 2.0.10 and this repo at e922e9ed10244586d510d5cdc35e3be6cad9c297 e.g.:

cd lib/mentions-inline-macro
asciidoctor -r ../mentions-inline-macro.rb --trace --failure-level info --verbose sample.adoc

it gives:

asciidoctor: INFO: expected substitution value for custom inline macro to be of type Inline; got String: @mojavelinux
asciidoctor: INFO: expected substitution value for custom inline macro to be of type Inline; got String: mention:mojavelinux[Dan]

I would also recommending merging this repo into main tree to make it more likely that people will grep and see this kind of thing.

mojavelinux commented 4 years ago

Yes, it's time to upgrade.

ggrossetie commented 4 years ago

I would also recommending merging this repo into main tree to make it more likely that people will grep and see this kind of thing.

@mojavelinux What do you think about that? Maybe we should restructure this repository to make it easy to write unit tests?

mojavelinux commented 4 years ago

First order of business, yes, tests. :100:

I don't think this should be in the main repo, though. This is intended to be a lab. Anything goes here and we don't have to worry about it tainting the main repo. It's a safe space for experimentation and demonstration.

Now, if there's an extension that is production worthy, it should be graduated out of here. After all, this is a lab, as it says on the tin. I could maybe see a very important extension being hosted in core, if there's a reason it has to remain an extension. The case needs to be made for that per extension. But most of the time, it should become its own project, like asciidoctor-mathematical or asciidoctor-diagram, etc.

ggrossetie commented 4 years ago

@mojavelinux I have a branch where I've added a Gemfile, a gemspec and a Rake file to run tests using Rspec. Should I open a pull request?

mojavelinux commented 9 months ago

I believe this is now resolved as of eaaf11e5d9da22f3ae71bc245e20cbf6fc4cf0f2. If you discover any extensions which are still showing a warning, please file a separate issue for each extension.