File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ func edit(cmd *cobra.Command, args []string) {
157
157
158
158
body := params .body
159
159
if isADF {
160
- body = md .JiraToGithubFlavored (body )
160
+ body = md .ToJiraMD (body )
161
161
}
162
162
163
163
er := jira.EditRequest {
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ func (c *Client) getRequestData(req *CreateRequest) *createRequest {
155
155
156
156
switch v := req .Body .(type ) {
157
157
case string :
158
- cf .Description = md .JiraToGithubFlavored (v )
158
+ cf .Description = md .ToJiraMD (v )
159
159
case * adf.ADF :
160
160
cf .Description = v
161
161
}
Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ type issueCommentRequest struct {
218
218
// AddIssueComment adds comment to an issue using POST /issue/{key}/comment endpoint.
219
219
// It only supports plain text comments at the moment.
220
220
func (c * Client ) AddIssueComment (key , comment string ) error {
221
- body , err := json .Marshal (& issueCommentRequest {Body : md .JiraToGithubFlavored (comment )})
221
+ body , err := json .Marshal (& issueCommentRequest {Body : md .ToJiraMD (comment )})
222
222
if err != nil {
223
223
return err
224
224
}
Original file line number Diff line number Diff line change 5
5
bf "github.com/russross/blackfriday/v2"
6
6
)
7
7
8
- // JiraToGithubFlavored translates Jira flavored markdown to Github flavored markdown.
9
- func JiraToGithubFlavored (jfm string ) string {
8
+ // ToJiraMD translates CommonMark to Jira flavored markdown.
9
+ func ToJiraMD (jfm string ) string {
10
10
if jfm == "" {
11
11
return jfm
12
12
}
Original file line number Diff line number Diff line change 6
6
"github.com/stretchr/testify/assert"
7
7
)
8
8
9
- func TestJiraToGithubFlavored (t * testing.T ) {
9
+ func TestToJiraMD (t * testing.T ) {
10
10
jfm := `# H1
11
11
Some _Markdown_ text.
12
12
@@ -105,5 +105,5 @@ func main\(\) {
105
105
fmt.Println\("hello world"\)
106
106
}` + "```\n \n "
107
107
108
- assert .Equal (t , expected , JiraToGithubFlavored (jfm ))
108
+ assert .Equal (t , expected , ToJiraMD (jfm ))
109
109
}
You can’t perform that action at this time.
0 commit comments