Skip to content

Commit cd5b5cd

Browse files
authored
fix: use markdown blockquote in --reply-to instead of wiki markup (#34)
fix: use markdown blockquote instead of wiki markup in --reply-to The reply-to feature was using Jira wiki markup ({quote}...{quote}) to quote the original comment, but the body is parsed as Markdown and converted to ADF. This caused the literal text "{quote}" to appear in the rendered comment. Switch to Markdown blockquote syntax (> prefix) which the parser correctly converts to ADF blockquote nodes.
1 parent 7b023bc commit cd5b5cd

File tree

1 file changed

+4
-4
lines changed
  • internal/cmd/issue/comment

1 file changed

+4
-4
lines changed

internal/cmd/issue/comment/add.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,16 @@ func replyToComment(ctx context.Context, jira *api.JiraService, hostname string,
159159
originalAuthor = originalComment.Author.DisplayName
160160
}
161161

162-
// Create quoted reply
162+
// Create quoted reply using Markdown blockquote syntax
163163
quotedLines := strings.Split(originalText, "\n")
164164
var quoted strings.Builder
165-
fmt.Fprintf(&quoted, "*Replying to %s:*\n", originalAuthor)
166-
quoted.WriteString("{quote}\n")
165+
fmt.Fprintf(&quoted, "_Replying to %s:_\n\n", originalAuthor)
167166
for _, line := range quotedLines {
167+
quoted.WriteString("> ")
168168
quoted.WriteString(line)
169169
quoted.WriteString("\n")
170170
}
171-
quoted.WriteString("{quote}\n\n")
171+
quoted.WriteString("\n")
172172
quoted.WriteString(opts.Body)
173173

174174
commentOpts := &api.CommentOptions{

0 commit comments

Comments
 (0)