branch: [ master ] | branch: [ master ] | ||||
update-translations: | update-translations: | ||||
image: alpine:3.6 | |||||
image: alpine:3.7 | |||||
commands: | commands: | ||||
- mv ./options/locale/locale_en-US.ini ./options/ | - mv ./options/locale/locale_en-US.ini ./options/ | ||||
- sed -i -e 's/="/=/g' -e 's/"$$//g' ./options/locale/*.ini | - sed -i -e 's/="/=/g' -e 's/"$$//g' ./options/locale/*.ini | ||||
event: [ push, tag, pull_request ] | event: [ push, tag, pull_request ] | ||||
build: | build: | ||||
image: golang:1.10 | |||||
image: golang:1.11 | |||||
pull: true | pull: true | ||||
environment: | environment: | ||||
TAGS: bindata sqlite | TAGS: bindata sqlite | ||||
event: [ push, tag, pull_request ] | event: [ push, tag, pull_request ] | ||||
test: | test: | ||||
image: golang:1.10 | |||||
image: golang:1.11 | |||||
pull: true | pull: true | ||||
group: test | group: test | ||||
environment: | environment: | ||||
branch: [ master ] | branch: [ master ] | ||||
test: | test: | ||||
image: golang:1.10 | |||||
image: golang:1.11 | |||||
pull: true | pull: true | ||||
group: test | group: test | ||||
environment: | environment: | ||||
branch: [ release/* ] | branch: [ release/* ] | ||||
test: | test: | ||||
image: golang:1.10 | |||||
image: golang:1.11 | |||||
pull: true | pull: true | ||||
group: test | group: test | ||||
environment: | environment: | ||||
# event: [ push, tag, pull_request ] | # event: [ push, tag, pull_request ] | ||||
test-mysql: | test-mysql: | ||||
image: golang:1.10 | |||||
image: golang:1.11 | |||||
pull: true | pull: true | ||||
group: test | group: test | ||||
environment: | environment: | ||||
branch: [ master ] | branch: [ master ] | ||||
test-mysql: | test-mysql: | ||||
image: golang:1.10 | |||||
image: golang:1.11 | |||||
pull: true | pull: true | ||||
group: test | group: test | ||||
environment: | environment: | ||||
event: [ tag ] | event: [ tag ] | ||||
test-pgsql: | test-pgsql: | ||||
image: golang:1.10 | |||||
image: golang:1.11 | |||||
pull: true | pull: true | ||||
group: test | group: test | ||||
environment: | environment: | ||||
event: [ push, tag, pull_request ] | event: [ push, tag, pull_request ] | ||||
generate-coverage: | generate-coverage: | ||||
image: golang:1.10 | |||||
image: golang:1.11 | |||||
pull: true | pull: true | ||||
environment: | environment: | ||||
TAGS: bindata | TAGS: bindata |
) ([]byte, error) { | ) ([]byte, error) { | ||||
// create the context from the parameters | // create the context from the parameters | ||||
ctx := &postProcessCtx{ | ctx := &postProcessCtx{ | ||||
metas: metas, | |||||
urlPrefix: urlPrefix, | |||||
isWikiMarkdown: isWikiMarkdown, | |||||
procs: defaultProcessors, | |||||
metas: metas, | |||||
urlPrefix: urlPrefix, | |||||
isWikiMarkdown: isWikiMarkdown, | |||||
procs: defaultProcessors, | |||||
visitLinksForShortLinks: true, | visitLinksForShortLinks: true, | ||||
} | } | ||||
return ctx.postProcess(rawHTML) | return ctx.postProcess(rawHTML) |
} | } | ||||
return str[start:end] | return str[start:end] | ||||
}, | }, | ||||
"EllipsisString": base.EllipsisString, | |||||
"DiffTypeToStr": DiffTypeToStr, | |||||
"DiffLineTypeToStr": DiffLineTypeToStr, | |||||
"Sha1": Sha1, | |||||
"ShortSha": base.ShortSha, | |||||
"MD5": base.EncodeMD5, | |||||
"EllipsisString": base.EllipsisString, | |||||
"DiffTypeToStr": DiffTypeToStr, | |||||
"DiffLineTypeToStr": DiffLineTypeToStr, | |||||
"Sha1": Sha1, | |||||
"ShortSha": base.ShortSha, | |||||
"MD5": base.EncodeMD5, | |||||
"ActionContent2Commits": ActionContent2Commits, | "ActionContent2Commits": ActionContent2Commits, | ||||
"PathEscape": url.PathEscape, | "PathEscape": url.PathEscape, | ||||
"EscapePound": func(str string) string { | "EscapePound": func(str string) string { |