Browse Source

markup: use default link formation when no format in metas (#6723)

# Conflicts:
#	CHANGELOG.md
Joe Chen 3 years ago
parent
commit
5a04c47cf0
2 changed files with 23 additions and 20 deletions
  1. 22 19
      CHANGELOG.md
  2. 1 1
      internal/markup/markup.go

+ 22 - 19
CHANGELOG.md

@@ -7,7 +7,10 @@ All notable changes to Gogs are documented in this file.
 ### Added
 ### Added
 
 
 - An unlisted option is added when create or migrate a repository. Unlisted repositories are public but not being listed for users without direct access in the UI. [#5733](https://github.com/gogs/gogs/issues/5733)
 - An unlisted option is added when create or migrate a repository. Unlisted repositories are public but not being listed for users without direct access in the UI. [#5733](https://github.com/gogs/gogs/issues/5733)
-- Add new configuration option `[git.timeout] DIFF` for customizing operation timeout of `git diff`. [#6315](https://github.com/gogs/gogs/issues/6315)
+- New configuration option `[git.timeout] DIFF` for customizing operation timeout of `git diff`. [#6315](https://github.com/gogs/gogs/issues/6315)
+- New configuration option `[server] SSH_SERVER_MACS` for setting list of accepted MACs for connections to builtin SSH server. [#6434](https://github.com/gogs/gogs/issues/6434)
+- Support specifying custom schema for PostgreSQL. [#6695](https://github.com/gogs/gogs/pull/6695)
+- New languages support: Mongolian. [#6510](https://github.com/gogs/gogs/pull/6510)
 
 
 ### Changed
 ### Changed
 
 
@@ -17,28 +20,28 @@ All notable changes to Gogs are documented in this file.
 
 
 ### Fixed
 ### Fixed
 
 
-- Add `X-Frame-Options` header to prevent Clickjacking. [#6409](https://github.com/gogs/gogs/issues/6409) 
-- [Security] Potential SSRF attack by CRLF injection via repository migration. [#6413](https://github.com/gogs/gogs/issues/6413)
-
+- Add `X-Frame-Options` header to prevent Clickjacking. [#6409](https://github.com/gogs/gogs/issues/6409)
+- _Regression:_ Fixed smart links for issues stops rendering. [#6506](https://github.com/gogs/gogs/issues/6506)
+- _Security:_ Potential SSRF attack by CRLF injection via repository migration. [#6413](https://github.com/gogs/gogs/issues/6413)
 
 
 ### Removed
 ### Removed
 
 
 - ⚠️ Migrations before 0.12 are removed, installations not on 0.12 should upgrade to it to run the migrations and then upgrade to 0.13.
 - ⚠️ Migrations before 0.12 are removed, installations not on 0.12 should upgrade to it to run the migrations and then upgrade to 0.13.
-- Configuration section `[mailer]` is no longer used.
-- Configuration section `[service]` is no longer used.
-- Configuration option `APP_NAME` is no longer used.
-- Configuration option `[security] REVERSE_PROXY_AUTHENTICATION_USER` is no longer used.
-- Configuration option `[auth] ACTIVE_CODE_LIVE_MINUTES` is no longer used.
-- Configuration option `[auth] RESET_PASSWD_CODE_LIVE_MINUTES` is no longer used.
-- Configuration option `[auth] ENABLE_CAPTCHA` is no longer used.
-- Configuration option `[auth] ENABLE_NOTIFY_MAIL` is no longer used.
-- Configuration option `[auth] REGISTER_EMAIL_CONFIRM` is no longer used.
-- Configuration option `[session] GC_INTERVAL_TIME` is no longer used.
-- Configuration option `[session] SESSION_LIFE_TIME` is no longer used.
-- Configuration option `[server] ROOT_URL` is no longer used.
-- Configuration option `[server] LANDING_PAGE` is no longer used.
-- Configuration option `[database] DB_TYPE` is no longer used.
-- Configuration option `[database] PASSWD` is no longer used.
+- Configuration section `[mailer]` is no longer used, please use `[email]`.
+- Configuration section `[service]` is no longer used, please use `[auth]`.
+- Configuration option `APP_NAME` is no longer used, please use `BRAND_NAME`.
+- Configuration option `[security] REVERSE_PROXY_AUTHENTICATION_USER` is no longer used, please use `[auth] REVERSE_PROXY_AUTHENTICATION_HEADER`.
+- Configuration option `[auth] ACTIVE_CODE_LIVE_MINUTES` is no longer used, please use `[auth] ACTIVATE_CODE_LIVES`.
+- Configuration option `[auth] RESET_PASSWD_CODE_LIVE_MINUTES` is no longer used, please use `[auth] RESET_PASSWORD_CODE_LIVES`.
+- Configuration option `[auth] ENABLE_CAPTCHA` is no longer used, please use `[auth] ENABLE_REGISTRATION_CAPTCHA`.
+- Configuration option `[auth] ENABLE_NOTIFY_MAIL` is no longer used, please use `[user] ENABLE_EMAIL_NOTIFICATION`.
+- Configuration option `[auth] REGISTER_EMAIL_CONFIRM` is no longer used, please use `[auth] REQUIRE_EMAIL_CONFIRMATION`.
+- Configuration option `[session] GC_INTERVAL_TIME` is no longer used, please use `[session] GC_INTERVAL`.
+- Configuration option `[session] SESSION_LIFE_TIME` is no longer used, please use `[session] MAX_LIFE_TIME`.
+- Configuration option `[server] ROOT_URL` is no longer used, please use `[server] EXTERNAL_URL`.
+- Configuration option `[server] LANDING_PAGE` is no longer used, please use `[server] LANDING_URL`.
+- Configuration option `[database] DB_TYPE` is no longer used, please use `[database] TYPE`.
+- Configuration option `[database] PASSWD` is no longer used, please use `[database] PASSWORD`.
 
 
 ## 0.12.3
 ## 0.12.3
 
 

+ 1 - 1
internal/markup/markup.go

@@ -101,7 +101,7 @@ func RenderIssueIndexPattern(rawBytes []byte, urlPrefix string, metas map[string
 			m = m[1:]
 			m = m[1:]
 		}
 		}
 		var link string
 		var link string
-		if metas == nil {
+		if metas == nil || metas["format"] == "" {
 			link = fmt.Sprintf(`<a href="%s/issues/%s">%s</a>`, urlPrefix, m[1:], m)
 			link = fmt.Sprintf(`<a href="%s/issues/%s">%s</a>`, urlPrefix, m[1:], m)
 		} else {
 		} else {
 			// Support for external issue tracker
 			// Support for external issue tracker