This is a JIRA issue jira:PRJ-200[].
Created
February 23, 2015 12:54
-
-
Save mrhaki/f5cfb32a28086bd00236 to your computer and use it in GitHub Desktop.
Simple inline macro for JIRA issue linking in Asciidoctor with Gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.2' | |
} | |
} | |
apply plugin: 'org.asciidoctor.convert' | |
asciidoctor { | |
extensions { | |
inlinemacro (name: "jira") { | |
parent, target, attributes -> | |
options = [ | |
"type": ":link", | |
"target": "http://www.jira.com/browse/${target}".toString() | |
] | |
createInline(parent, "anchor", target, attributes, options).render() | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="paragraph"> | |
<p>This is a JIRA issue <a href="http://www.jira.com/browser/PRJ-200">PRJ-200</a>.</p> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment