@@ -553,18 +553,9 @@ func generatePRBody(g *git.Git, base, head string) (string, error) {
553553 return sb .String (), nil
554554}
555555
556- // unwrapParagraphs removes hard line breaks within plain-text paragraphs while
557- // preserving intentional structure: blank lines, markdown block-level syntax
558- // (headers, lists, blockquotes, horizontal rules), and code blocks (both fenced
559- // and indented). This converts the ~72-column convention used in commit messages
560- // into flowing text suitable for GitHub's markdown renderer.
561- //
562- // If HTML tags are found in prose (outside code blocks and inline code spans),
563- // the entire text is returned as-is — anyone writing raw HTML in a commit message
564- // is doing something intentional with formatting.
565-
566- // htmlTagRe matches anything that looks like an HTML tag (e.g. <div>, </span>, <br/>).
567- var htmlTagRe = regexp .MustCompile (`</?[a-zA-Z][a-zA-Z0-9]*[\s/>]` )
556+ // htmlTagRe matches anything that looks like an HTML tag, including custom
557+ // elements with hyphens (e.g. <my-component>) and namespaced tags (e.g. <xml:tag>).
558+ var htmlTagRe = regexp .MustCompile (`</?[a-zA-Z][-:a-zA-Z0-9]*[\s/>]` )
568559
569560// inlineCodeRe matches backtick-enclosed inline code spans so we can strip them
570561// before checking for HTML. Otherwise `<token>` in code would trigger a false positive.
@@ -620,6 +611,15 @@ func containsHTMLOutsideCode(text string) bool {
620611 return false
621612}
622613
614+ // unwrapParagraphs removes hard line breaks within plain-text paragraphs while
615+ // preserving intentional structure: blank lines, markdown block-level syntax
616+ // (headers, lists, blockquotes, horizontal rules), and code blocks (both fenced
617+ // and indented). This converts the ~72-column convention used in commit messages
618+ // into flowing text suitable for GitHub's markdown renderer.
619+ //
620+ // If HTML tags are found in prose (outside code blocks and inline code spans),
621+ // the entire text is returned as-is — anyone writing raw HTML in a commit message
622+ // is doing something intentional with formatting.
623623func unwrapParagraphs (text string ) string {
624624 if text == "" {
625625 return ""
0 commit comments