asciidoctor / asciidoclet

:clipboard: A Javadoc Doclet based on Asciidoctor that lets you write Javadoc in the AsciiDoc syntax.
https://github.com/asciidoctor/asciidoclet
Apache License 2.0
133 stars 40 forks source link

add syntax highlighting, fix tags, update examples #1

Closed mojavelinux closed 11 years ago

mojavelinux commented 11 years ago
johncarl81 commented 11 years ago

I wonder if there is a better solution for handing tag content via asciidoctor. The intention here is to allow you to add very basic styling and links. Is there an option with the render method to only allow a subset of the features?

johncarl81 commented 11 years ago

I realized that a minute after commenting ;-) no biggy

mojavelinux commented 11 years ago

As it turns out, Asciidoclet just made me aware of the need to have an inine-only processing mode. A new use case! Yeah!

I did some thinking and what seems to fit best is to call this a doctype. There are currently two types of doctypes in Asciidoctor, article and book. They describe the container that is used to render the output. Not yet implemented in Asciidoctor is the manpage doctype from AsciiDoc, just to give you an idea of another example.

Thus, it makes sense to have an "inline" doctype. This doctype assumes there is exactly one block, that the block is a paragraph block (a sequence of characters) and it should be output without any wrapper tags.

I'll need to add this to Asciidoctor. I'll refer to this project as a use case in the issue. In the meantime, you can just render with Asciidoctor, then extract the content inside the <p> tags and return it. Add a note that this will change once the "inline" doctype is implemented.

mojavelinux commented 11 years ago

If you want I can add that special processing and squash the commits together before you merge. Sound good?

johncarl81 commented 11 years ago

Very nice. An inline doctype sounds perfect.

Yes please, proceed with the updates.

Btw, your updated examples and CodeRay formatting looks great!

mojavelinux commented 11 years ago

Thanks!

Here's the pull request that implements the inline doctype: https://github.com/asciidoctor/asciidoctor/pull/329

mojavelinux commented 11 years ago

There you go.

johncarl81 commented 11 years ago

Great updates Dan, glad we could figure out a solution for tags. Looking forward to asciidoctor/asciidoctor#328. Merged.

mojavelinux commented 11 years ago

:beers: