From fee347d2988c8f294c82e3cd078114fca5e35fdc Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Wed, 26 Apr 2023 10:02:10 -0400 Subject: [PATCH 1/2] resolve conflicts and fix typo --- custom/conf/app.example.ini | 4 ++-- docs/content/doc/administration/config-cheat-sheet.en-us.md | 3 ++- modules/setting/markup.go | 2 +- modules/setting/repository.go | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 144691c00cd03..3687e0fbd4caf 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -992,7 +992,7 @@ ROUTER = console ;; ;; List of file extensions for which lines should be wrapped in the Monaco editor ;; Separate extensions with a comma. To line wrap files without an extension, just put a comma -;LINE_WRAP_EXTENSIONS = .txt,.md,.markdown,.mdown,.mkd, +;LINE_WRAP_EXTENSIONS = .txt,.md,.markdown,.mdown,.mkd,.livemd, ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -1334,7 +1334,7 @@ ROUTER = console ;; ;; List of file extensions that should be rendered/edited as Markdown ;; Separate the extensions with a comma. To render files without any extension as markdown, just put a comma -;FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd +;FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd,.livemd ;; ;; Enables math inline and block detection ;ENABLE_MATH = true diff --git a/docs/content/doc/administration/config-cheat-sheet.en-us.md b/docs/content/doc/administration/config-cheat-sheet.en-us.md index 74110ea443ba1..be97edadb5732 100644 --- a/docs/content/doc/administration/config-cheat-sheet.en-us.md +++ b/docs/content/doc/administration/config-cheat-sheet.en-us.md @@ -117,7 +117,7 @@ In addition there is _`StaticRootPath`_ which can be set as a built-in at build ### Repository - Editor (`repository.editor`) -- `LINE_WRAP_EXTENSIONS`: **.txt,.md,.markdown,.mdown,.mkd,**: List of file extensions for which lines should be wrapped in the Monaco editor. Separate extensions with a comma. To line wrap files without an extension, just put a comma +- `LINE_WRAP_EXTENSIONS`: **.txt,.md,.markdown,.mdown,.mkd,.livemd,**: List of file extensions for which lines should be wrapped in the Monaco editor. Separate extensions with a comma. To line wrap files without an extension, just put a comma - `PREVIEWABLE_FILE_MODES`: **markdown**: Valid file modes that have a preview API associated with them, such as `api/v1/markdown`. Separate the values by commas. The preview tab in edit mode won't be displayed if the file extension doesn't match. ### Repository - Pull Request (`repository.pull-request`) @@ -277,6 +277,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `CUSTOM_URL_SCHEMES`: Use a comma separated list (ftp,git,svn) to indicate additional URL hyperlinks to be rendered in Markdown. URLs beginning in http and https are always displayed +- `FILE_EXTENSIONS`: **.md,.markdown,.mdown,.mkd,.livemd**: List of file extensions that should be rendered/edited as Markdown. Separate the extensions with a comma. To render files without any extension as markdown, just put a comma. - `ENABLE_MATH`: **true**: Enables detection of `\(...\)`, `\[...\]`, `$...$` and `$$...$$` blocks as math blocks. ## Server (`server`) diff --git a/modules/setting/markup.go b/modules/setting/markup.go index 969e30e888f8d..8e48bf5404ca5 100644 --- a/modules/setting/markup.go +++ b/modules/setting/markup.go @@ -33,7 +33,7 @@ var Markdown = struct { }{ EnableHardLineBreakInComments: true, EnableHardLineBreakInDocuments: false, - FileExtensions: strings.Split(".md,.markdown,.mdown,.mkd", ","), + FileExtensions: strings.Split(".md,.markdown,.mdown,.mkd,.livemd,", ","), EnableMath: true, } diff --git a/modules/setting/repository.go b/modules/setting/repository.go index bae3c658a4855..20ed6d0dcd559 100644 --- a/modules/setting/repository.go +++ b/modules/setting/repository.go @@ -168,7 +168,7 @@ var ( Editor: struct { LineWrapExtensions []string }{ - LineWrapExtensions: strings.Split(".txt,.md,.markdown,.mdown,.mkd,", ","), + LineWrapExtensions: strings.Split(".txt,.md,.markdown,.mdown,.mkd,.livemd,", ","), }, // Repository upload settings From fdfbd3d03c603e14f9cb57455afeb891a796e0a1 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Wed, 26 Apr 2023 10:03:31 -0400 Subject: [PATCH 2/2] rm extra comma --- modules/setting/markup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/setting/markup.go b/modules/setting/markup.go index 8e48bf5404ca5..6c2246342be8e 100644 --- a/modules/setting/markup.go +++ b/modules/setting/markup.go @@ -33,7 +33,7 @@ var Markdown = struct { }{ EnableHardLineBreakInComments: true, EnableHardLineBreakInDocuments: false, - FileExtensions: strings.Split(".md,.markdown,.mdown,.mkd,.livemd,", ","), + FileExtensions: strings.Split(".md,.markdown,.mdown,.mkd,.livemd", ","), EnableMath: true, }