@ -852,11 +852,14 @@ func fullIssuePatternProcessor(ctx *RenderContext, node *html.Node) {
}
}
func issueIndexPatternProcessor ( ctx * RenderContext , node * html . Node ) {
func issueIndexPatternProcessor ( ctx * RenderContext , node * html . Node ) {
// FIXME: the use of "mode" is quite dirty and hacky, for example: what is a "document"? how should it be rendered?
if ctx . Metas == nil {
// The "mode" approach should be refactored to some other more clear&reliable way.
if ctx . Metas == nil || ( ctx . Metas [ "mode" ] == "document" && ! ctx . IsWiki ) {
return
return
}
}
// FIXME: the use of "mode" is quite dirty and hacky, for example: what is a "document"? how should it be rendered?
// The "mode" approach should be refactored to some other more clear&reliable way.
crossLinkOnly := ( ctx . Metas [ "mode" ] == "document" && ! ctx . IsWiki )
var (
var (
found bool
found bool
ref * references . RenderizableReference
ref * references . RenderizableReference
@ -870,7 +873,7 @@ func issueIndexPatternProcessor(ctx *RenderContext, node *html.Node) {
// Repos with external issue trackers might still need to reference local PRs
// Repos with external issue trackers might still need to reference local PRs
// We need to concern with the first one that shows up in the text, whichever it is
// We need to concern with the first one that shows up in the text, whichever it is
isNumericStyle := ctx . Metas [ "style" ] == "" || ctx . Metas [ "style" ] == IssueNameStyleNumeric
isNumericStyle := ctx . Metas [ "style" ] == "" || ctx . Metas [ "style" ] == IssueNameStyleNumeric
foundNumeric , refNumeric := references . FindRenderizableReferenceNumeric ( node . Data , hasExtTrackFormat && ! isNumericStyle )
foundNumeric , refNumeric := references . FindRenderizableReferenceNumeric ( node . Data , hasExtTrackFormat && ! isNumericStyle , crossLinkOnly )
switch ctx . Metas [ "style" ] {
switch ctx . Metas [ "style" ] {
case "" , IssueNameStyleNumeric :
case "" , IssueNameStyleNumeric :