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

Range support #5

Closed johncarl81 closed 11 years ago

johncarl81 commented 11 years ago

Incorporating code blocks can be tricky as they quickly become out-of-sync with the live code. This is mitigated by referencing real compiled code via the existing Asciidoctor range support

Example:

/**
 * [source,java]
 * --
 * include::Example.java[tags=snippet]
 */
public class Example.java {
    //tag::snippet[]
    public void includeMe(){}
    //tag::snippet[]
}

would results in teh following main javadoc:

public void includeMe(){}

Related to: https://github.com/asciidoctor/asciidoctor/issues/226