Closed robertpanzer closed 6 months ago
The code is still raw, but I'd like to get some feedback on what approach to pursue.
I can have a look tomorrow. But 1 question, from the description it seems this is preferable to #1248, is there something between the two you are not convinced, so both should be checked. Or this is the final approach? To me it makes sense to reuse the invoker, but I haven't looked into the details.
I think this PR addresses #193. Although this implementation takes a different approach, the spirit of the solution is still the same, to reuse the Asciidoctor CLI instead of maintaining a clone of it. In that regard, I think it's a great step forward.
@abelsromero About
only the fact that it seems this does not support input redirection
I tried this, and I see the output piped to less:
echo '= TEST' | ../asciidoctorj-distribution/build/install/asciidoctorj-distribution/bin/asciidoctorj - |less
Can you share some details about what failed for you?
Can you share some details about what failed for you?
I mentioned because I saw the code being remove, but it's working fine for me (Linux). I built a distribution and converted both files and from cli cat sample.adoc | asciidoctorj - > sample.html
perfectly.
:+1:
Thank you for opening a pull request and contributing to AsciidoctorJ!
Please take a bit of time giving some details about your pull request:
Kind of change
Description
What is the goal of this pull request?
This PR should do the same thing as #1248, that is better align the behavior of the AsciidoctorJ CLI with the behavior of the Asciidoctor Ruby CLI. This PR however, reuses the original Asciidoctor::Cli::Invoker and feeds its own options into it instead of letting Asciidoctor Ruby parse them.
So chances are that this works a bit better than the other PR.
The code is still raw, but I'd like to get some feedback on what approach to pursue.
How does it achieve that?
Are there any alternative ways to implement this?
Are there any implications of this pull request? Anything a user must know?
Issue
If this PR fixes an open issue, please add a line of the form:
Fixes #Issue
Release notes
Please add a corresponding entry to the file CHANGELOG.adoc