Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow different HardBreaks settings for documents and comments #11515

Merged
merged 11 commits into from
May 24, 2020
Prev Previous commit
Next Next commit
fix tests
Signed-off-by: Andrew Thornton <[email protected]>
  • Loading branch information
zeripath committed May 20, 2020
commit a105bf16a439b0c8dde549a21a085f37e0d1da2b
2 changes: 1 addition & 1 deletion routers/api/v1/misc/markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func Markdown(ctx *context.APIContext, form api.MarkdownOption) {
case "gfm":
md := []byte(form.Text)
urlPrefix := form.Context
var meta map[string]string
meta := map[string]string{}
if !strings.HasPrefix(setting.AppSubURL+"/", urlPrefix) {
// check if urlPrefix is already set to a URL
linkRegex, _ := xurls.StrictMatchingScheme("https?:https://")
Expand Down
2 changes: 1 addition & 1 deletion routers/api/v1/misc/markdown_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Here are some links to the most important topics. You can find the full list of
<p><strong>Wine Staging</strong> on website <a href="http:https://wine-staging.com" rel="">wine-staging.com</a>.</p>
<h2 id="user-content-quick-links">Quick Links</h2>
<p>Here are some links to the most important topics. You can find the full list of pages at the sidebar.</p>
<p><a href="` + AppSubURL + `wiki/Configuration" rel="">Configuration</a><br/>
<p><a href="` + AppSubURL + `wiki/Configuration" rel="">Configuration</a>
<a href="` + AppSubURL + `wiki/raw/images/icon-bug.png" rel=""><img src="` + AppSubURL + `wiki/raw/images/icon-bug.png" title="icon-bug.png" alt="images/icon-bug.png"/></a></p>
`,
// Guard wiki sidebar: special syntax
Expand Down