Skip to content

Commit 66dafdd

Browse files
committed
Revert "enable ENABLE_HARD_LINE_BREAK by default (go-gitea#11162)"
This reverts commit 7e20f1c. This commit causes Gitea to diverge from Github not move towards it and should be reverted
1 parent 50a9727 commit 66dafdd

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

custom/conf/app.ini.sample

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,8 @@ TIMEOUT_STEP = 10s
213213
EVENT_SOURCE_UPDATE_TIME = 10s
214214

215215
[markdown]
216-
; Render soft line breaks as hard line breaks, which means a single newline character between
217-
; paragraphs will cause a line break and adding trailing whitespace to paragraphs is not
218-
; necessary to force a line break.
219-
ENABLE_HARD_LINE_BREAK = true
216+
; Enable hard line break extension
217+
ENABLE_HARD_LINE_BREAK = false
220218
; Comma separated list of custom URL-Schemes that are allowed as links when rendering Markdown
221219
; for example git,magnet,ftp (more at https://en.wikipedia.org/wiki/List_of_URI_schemes)
222220
; URLs starting with http and https are always displayed, whatever is put in this entry.

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
152152

153153
## Markdown (`markdown`)
154154

155-
- `ENABLE_HARD_LINE_BREAK`: **true**: Render soft line breaks as hard line breaks, which
156-
means a single newline character between paragraphs will cause a line break and adding
157-
trailing whitespace to paragraphs is not necessary to force a line break.
155+
- `ENABLE_HARD_LINE_BREAK`: **false**: Enable Markdown's hard line break extension.
158156
- `CUSTOM_URL_SCHEMES`: Use a comma separated list (ftp,git,svn) to indicate additional
159157
URL hyperlinks to be rendered in Markdown. URLs beginning in http and https are
160158
always displayed

modules/markup/markdown/markdown_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ func testAnswers(baseURLContent, baseURLImages string) []string {
133133
`,
134134
`<p><a href="http://www.excelsiorjet.com/" rel="nofollow">Excelsior JET</a> allows you to create native executables for Windows, Linux and Mac OS X.</p>
135135
<ol>
136-
<li><a href="https://github.com/libgdx/libgdx/wiki/Gradle-on-the-Commandline#packaging-for-the-desktop" rel="nofollow">Package your libGDX application</a><br/>
136+
<li><a href="https://github.com/libgdx/libgdx/wiki/Gradle-on-the-Commandline#packaging-for-the-desktop" rel="nofollow">Package your libGDX application</a>
137137
<a href="` + baseURLImages + `/images/1.png" rel="nofollow"><img src="` + baseURLImages + `/images/1.png" title="1.png" alt="images/1.png"/></a></li>
138-
<li>Perform a test run by hitting the Run! button.<br/>
138+
<li>Perform a test run by hitting the Run! button.
139139
<a href="` + baseURLImages + `/images/2.png" rel="nofollow"><img src="` + baseURLImages + `/images/2.png" title="2.png" alt="images/2.png"/></a></li>
140140
</ol>
141141
<h2 id="user-content-custom-id">More tests</h2>

modules/setting/setting.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ var (
260260
CustomURLSchemes []string `ini:"CUSTOM_URL_SCHEMES"`
261261
FileExtensions []string
262262
}{
263-
EnableHardLineBreak: true,
263+
EnableHardLineBreak: false,
264264
FileExtensions: strings.Split(".md,.markdown,.mdown,.mkd", ","),
265265
}
266266

routers/api/v1/misc/markdown_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Here are some links to the most important topics. You can find the full list of
9494
<p><strong>Wine Staging</strong> on website <a href="http://wine-staging.com" rel="nofollow">wine-staging.com</a>.</p>
9595
<h2 id="user-content-quick-links">Quick Links</h2>
9696
<p>Here are some links to the most important topics. You can find the full list of pages at the sidebar.</p>
97-
<p><a href="` + AppSubURL + `wiki/Configuration" rel="nofollow">Configuration</a><br/>
97+
<p><a href="` + AppSubURL + `wiki/Configuration" rel="nofollow">Configuration</a>
9898
<a href="` + AppSubURL + `wiki/raw/images/icon-bug.png" rel="nofollow"><img src="` + AppSubURL + `wiki/raw/images/icon-bug.png" title="icon-bug.png" alt="images/icon-bug.png"/></a></p>
9999
`,
100100
// Guard wiki sidebar: special syntax

0 commit comments

Comments
 (0)