mirror of
https://github.com/kovetskiy/mark.git
synced 2025-04-23 21:32:41 +08:00
Fix user mentioning
This commit is contained in:
parent
278488ed88
commit
22bf46026b
@ -1,4 +1,4 @@
|
||||
FROM golang:1.20.4 as builder
|
||||
FROM golang:1.20.5 as builder
|
||||
ENV GOPATH="/go"
|
||||
WORKDIR /go/src/github.com/kovetskiy/mark
|
||||
COPY / .
|
||||
|
8
go.mod
8
go.mod
@ -3,16 +3,16 @@ module github.com/kovetskiy/mark
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/dreampuf/mermaid.go v0.0.11-0.20230526022300-b9f3c833f943
|
||||
github.com/dreampuf/mermaid.go v0.0.11
|
||||
github.com/kovetskiy/gopencils v0.0.0-20230119081704-a73db75b2f69
|
||||
github.com/kovetskiy/lorg v1.2.0
|
||||
github.com/reconquest/karma-go v1.2.0
|
||||
github.com/reconquest/pkg v1.3.0
|
||||
github.com/reconquest/regexputil-go v0.0.0-20160905154124-38573e70c1f4
|
||||
github.com/stretchr/testify v1.8.3
|
||||
github.com/urfave/cli/v2 v2.25.3
|
||||
github.com/stretchr/testify v1.8.4
|
||||
github.com/urfave/cli/v2 v2.25.5
|
||||
github.com/yuin/goldmark v1.5.4
|
||||
golang.org/x/tools v0.9.1
|
||||
golang.org/x/tools v0.9.3
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
)
|
||||
|
||||
|
16
go.sum
16
go.sum
@ -14,8 +14,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dreampuf/mermaid.go v0.0.11-0.20230526022300-b9f3c833f943 h1:9VMWawjkcL1+ItxBKDVcRiJUfAaJNyXD88zfZbyP4Go=
|
||||
github.com/dreampuf/mermaid.go v0.0.11-0.20230526022300-b9f3c833f943/go.mod h1:u9T+LhbKn5d/jC7KzMhncsG/zOfK/14CRFSPbpaGbeI=
|
||||
github.com/dreampuf/mermaid.go v0.0.11 h1:XwxrW1TA48qc7Cg1ySvnrMPmap9U2uuvWvc4KuVKVR4=
|
||||
github.com/dreampuf/mermaid.go v0.0.11/go.mod h1:u9T+LhbKn5d/jC7KzMhncsG/zOfK/14CRFSPbpaGbeI=
|
||||
github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU=
|
||||
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
|
||||
github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
|
||||
@ -57,10 +57,10 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY=
|
||||
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/urfave/cli/v2 v2.25.3 h1:VJkt6wvEBOoSjPFQvOkv6iWIrsJyCrKGtCtxXWwmGeY=
|
||||
github.com/urfave/cli/v2 v2.25.3/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc=
|
||||
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/urfave/cli/v2 v2.25.5 h1:d0NIAyhh5shGscroL7ek/Ya9QYQE0KNabJgiUinIQkc=
|
||||
github.com/urfave/cli/v2 v2.25.5/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc=
|
||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
|
||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
|
||||
github.com/yuin/goldmark v1.5.4 h1:2uY/xC0roWy8IBEGLgB1ywIoEJFGmRrX21YQcvGZzjU=
|
||||
@ -71,8 +71,8 @@ golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo=
|
||||
golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
|
||||
golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM=
|
||||
golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
@ -17,8 +17,8 @@ import (
|
||||
)
|
||||
|
||||
type User struct {
|
||||
AccountID string `json:"accountId"`
|
||||
UserKey string `json:"userKey"`
|
||||
AccountID string `json:"accountId,omitempty"`
|
||||
UserKey string `json:"userKey,omitempty"`
|
||||
}
|
||||
|
||||
type API struct {
|
||||
|
File diff suppressed because one or more lines are too long
@ -136,7 +136,7 @@ func templates(api *confluence.API) (*template.Template, error) {
|
||||
`ac:link:user`: text(
|
||||
`{{ with .Name | user }}`,
|
||||
/**/ `<ac:link>`,
|
||||
/**/ `{{ with .AccountID }}`,
|
||||
/**/ `{{ if .AccountID }}`,
|
||||
/****/ `<ri:user ri:account-id="{{ .AccountID }}" />`,
|
||||
/**/ `{{ else }}`,
|
||||
/****/ `<ri:user ri:userkey="{{ .UserKey }}" />`,
|
||||
@ -338,7 +338,7 @@ func templates(api *confluence.API) (*template.Template, error) {
|
||||
`{{ with .Name | user }}`,
|
||||
`<ac:structured-macro ac:name="profile">`,
|
||||
`<ac:parameter ac:name="user">`,
|
||||
`{{ with .AccountID }}`,
|
||||
`{{ if .AccountID }}`,
|
||||
/**/ `<ri:user ri:account-id="{{ .AccountID }}" />`,
|
||||
`{{ else }}`,
|
||||
/**/ `<ri:user ri:userkey="{{ .UserKey }}" />`,
|
||||
|
Loading…
x
Reference in New Issue
Block a user