-
Notifications
You must be signed in to change notification settings - Fork 69
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
Prefix convert methods with convert_
#279
Comments
|
Marat is correct that both names work. Great care was taken when developing Asciidoctor 2 to not break existing converters like Asciidoctor EPUB3 and Asciidoctor PDF. The convert_ prefix is preferred once the minimum version of Asciidoctor is 2. (At that time, the converter should move to the new inheritance model as well). I think this should be considered for Asciidoctor EPUB3 2. My plan is to do the same for Asciidoctor PDF. |
We can rename methods (and adjust our dispatcher accordingly) now, and only delay reparenting to |
Thanks. I've made the changes while keeping old methods (with deprecation messages). |
I do not think we expect someone to call us programmatically, so keeping deprecated methods is not needed. @mojavelinux correct me if I'm wrong. |
That's actually pretty hard to answer. I want to say it's not needed, but then again, I have no idea what people are doing downstream with the converter as I haven't really looked. |
I believe they shouldn't do anything more than @lulalala let's drop that deprecation stuff, okay? |
@slonopotamus my friend expressed interest in writing the spec for conversion methods in
Just want do double check since my friend has never done open source contribution before so it's best that the contribution will be something that matches what you prefer :D |
My current plan is:
#282 brings in severe risk of breakage, so the more If you look at existing tests in asciidoctor-epub3 or asciidoctor-pdf, we do not test much on API/class/method level, but instead test conversion process as a blackbox. This allows to freely modify implementation while maintaining consistent output. You may thing about a converter as a big f(x)->y function that accepts asciidoc document (+ small number of configuration options) as an input and produces epub/mobi as an output. This is actually what users care about. |
You may also note that I became asciidoctor-epub3 maintainer not so long time ago (around 20th of January), so do not yet have strong knowledge of various quirks and hacks that are done in HTML output of asciidoctor-epub3. Some of them are outdated and no longer true, some are still valid, some stuff needs additional fixing (like #212). It would also be interesting to investigate possibilities of automated testing of visual rendering. asciidoctor-pdf has it and it's very cool from my point of view. But asciidoctor-epub3 likely can't go that route, we would need to actually run ebook program and capture its rendered picture. Dunno, as I said, it needs investigation. Created #285 for this. |
I saw that in
asciidoctor
's update last year (asciidoctor/asciidoctor#3150), node methods were renamed withconvert_
prefix.I wonder if the same thing should be done here? If so, I can try to do that.
ping @mojavelinux, @slonopotamus
The text was updated successfully, but these errors were encountered: