Skip to content

Commit ee986c3

Browse files
yardenshohamGusted
and
Gusted
committed
Update modules/templates/helper.go
Co-authored-by: Gusted <[email protected]>
1 parent 6d5d3da commit ee986c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/templates/helper.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,8 @@ func RenderCommitBody(ctx context.Context, msg, urlPrefix string, metas map[stri
796796
return template.HTML(renderedMessage)
797797
}
798798

799-
var codeMatcher = regexp.MustCompile("`([^`]+)`") // capture strings of the format `code-like text`
799+
// Match text that is between back ticks.
800+
var codeMatcher = regexp.MustCompile("`([^`]+)`")
800801

801802
func RenderCodeBlock(htmlEscapedTextToRender template.HTML) template.HTML {
802803
htmlWithCodeTags := codeMatcher.ReplaceAllString(string(htmlEscapedTextToRender), "<code>$1</code>") // replace with HTML <code> tags

0 commit comments

Comments
 (0)