mirror of https://gerrit.hackerspace.pl/hscloud
hackdoc: do not add ?ref= to intra-links unless necessary
Change-Id: I839863a8c10c54fae11100b885c972bed348eba6changes/41/441/1
parent
242ec58a33
commit
26f44da5f1
|
@ -19,6 +19,12 @@ func renderMarkdown(input []byte, ref string) []byte {
|
|||
Flags: blackfriday.CommonHTMLFlags | blackfriday.TOC,
|
||||
})
|
||||
|
||||
// master is the default branch - do not make special links for that, as
|
||||
// that makes them kinda ugly.
|
||||
if ref == "master" {
|
||||
ref = ""
|
||||
}
|
||||
|
||||
parser := blackfriday.New(blackfriday.WithRenderer(r), blackfriday.WithExtensions(blackfriday.CommonExtensions))
|
||||
ast := parser.Parse(input)
|
||||
|
||||
|
|
Loading…
Reference in New Issue