fixed caching issues when building the Help page
This commit is contained in:
parent
008880a644
commit
fb0d182092
2 changed files with 6 additions and 7 deletions
|
|
@ -1,7 +1,7 @@
|
|||
ext.markdownToHTML = { markdownPath, htmlPath, version ->
|
||||
ext.markdownToHTML = { markdownPath, htmlPath ->
|
||||
def text = new File(markdownPath).text
|
||||
|
||||
text = convertHeaders(text, version)
|
||||
text = convertHeaders(text)
|
||||
text = convertOrderedLists(text)
|
||||
text = convertUnorderedLists(text)
|
||||
text = convertInlineTags(text)
|
||||
|
|
@ -51,7 +51,7 @@ static insertIndex(html, index) {
|
|||
}
|
||||
|
||||
|
||||
static convertHeaders(markdown, version) {
|
||||
static convertHeaders(markdown) {
|
||||
def html = markdown.split("\n").collect { line ->
|
||||
if (line.startsWith("#")) {
|
||||
def headerNumber = 0
|
||||
|
|
@ -65,9 +65,7 @@ static convertHeaders(markdown, version) {
|
|||
def header = line.replaceAll("^#+", "").trim()
|
||||
def anchor = header.toLowerCase().replaceAll("[^a-z0-9]+", "-")
|
||||
|
||||
return "<h${headerNumber} id=\"${anchor}\">" +
|
||||
"${header}${headerNumber == 1 ? " v" + version : ''}" +
|
||||
"</h${headerNumber}>"
|
||||
return "<h${headerNumber} id=\"${anchor}\">${header}</h${headerNumber}>"
|
||||
} else {
|
||||
return line
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue