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

Any way for Asciidoclet to be lenient towards html ? #40

Closed
gjoseph opened this issue Mar 16, 2015 · 3 comments
Closed

Any way for Asciidoclet to be lenient towards html ? #40

gjoseph opened this issue Mar 16, 2015 · 3 comments

Comments

@gjoseph
Copy link

gjoseph commented Mar 16, 2015

I am on the verge of using Asciidoclet on a relatively large codebase, that has a lot of old-ish Javadoc written with html. I'd like to progressively enhance the docs, but I can't realistically go and convert all of the existing doc.
Is there any way to make Asciidoclet more lenient ? Perhaps something along the lines of "if there is html in the doc, let it be processed by the default doclet" ?

I am not familiar with how doclets work (i.e what input they get from the Javadoc tool), so this is perhaps more trouble than it's worth. I'd give it a shot though, if one of the devs of Asciidoc would indicate this is something they'd agree is useful. (although this might be quite tricky, since one might want html in their asciidoc, e.g code samples)

Alternatively, perhaps there are tools to help converting existing Javadoc ?

@gjoseph gjoseph changed the title Any for Asciidoclet to be lenient towards html ? Any way for Asciidoclet to be lenient towards html ? Mar 16, 2015
@johncarl81
Copy link
Member

Is there a way to specify which files are processed with which doclet? If so, then you could just specify the files that are processed with Asciidoclet as you convert them.

You could also escape all the files that you need to convert using the ++++ directive (http://asciidoctor.org/docs/user-manual/#built-in-blocks-summary). An easy way to do this is to perform a global replace with something like /** -> /**\n *++++ and *\n*/ -> *++++\n*/

It would be difficult to detect if HTML was used or not, I'd rather not complicate things if we can.

@gjoseph
Copy link
Author

gjoseph commented Mar 17, 2015

Thanks John, these are really good suggestions, both make a lot of sense and I'll probably end up using a combination of both !

@gjoseph gjoseph closed this as completed Mar 17, 2015
@johncarl81
Copy link
Member

Great @gjoseph! I'd love to hear about your experience with Asciidoclet. Email me directly or the Asciidoctor mailing list if you feel inclined.

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

2 participants