Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
919afb46
Commit
919afb46
authored
Jun 24, 2017
by
NGPixel
Committed by
Nicolas Giard
Jul 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Optional linebreaks + mathjax processing
parent
3d9aa18c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
2 deletions
+38
-2
config.sample.yml
config.sample.yml
+9
-0
config.docker.yml
npm/configs/config.docker.yml
+9
-0
config.heroku.yml
npm/configs/config.heroku.yml
+9
-0
data.yml
server/app/data.yml
+1
-0
markdown.js
server/libs/markdown.js
+10
-2
No files found.
config.sample.yml
View file @
919afb46
...
...
@@ -135,6 +135,15 @@ git:
showUserEmail
:
true
# ---------------------------------------------------------------------
# Features
# ---------------------------------------------------------------------
# You can enable / disable specific features below
features
:
linebreaks
:
true
mathjax
:
true
# ---------------------------------------------------------------------
# External Logging
# ---------------------------------------------------------------------
...
...
npm/configs/config.docker.yml
View file @
919afb46
...
...
@@ -133,6 +133,15 @@ git:
showUserEmail
:
true
# ---------------------------------------------------------------------
# Features
# ---------------------------------------------------------------------
# You can enable / disable specific features below
features
:
linebreaks
:
true
mathjax
:
true
# ---------------------------------------------------------------------
# External Logging
# ---------------------------------------------------------------------
...
...
npm/configs/config.heroku.yml
View file @
919afb46
...
...
@@ -133,6 +133,15 @@ git:
showUserEmail
:
$(WIKI_SHOW_USER_EMAIL)
# ---------------------------------------------------------------------
# Features
# ---------------------------------------------------------------------
# You can enable / disable specific features below
features
:
linebreaks
:
true
mathjax
:
true
# ---------------------------------------------------------------------
# External Logging
# ---------------------------------------------------------------------
...
...
server/app/data.yml
View file @
919afb46
...
...
@@ -49,6 +49,7 @@ defaults:
serverEmail
:
wiki@example.com
showUserEmail
:
true
features
:
linebreaks
:
true
mathjax
:
true
externalLogging
:
bugsnap
:
false
...
...
server/libs/markdown.js
View file @
919afb46
...
...
@@ -21,6 +21,7 @@ const mdRemove = require('remove-markdown')
var
mkdown
=
md
({
html
:
true
,
breaks
:
appconfig
.
features
.
linebreaks
,
linkify
:
true
,
typography
:
true
,
highlight
(
str
,
lang
)
{
...
...
@@ -53,7 +54,10 @@ var mkdown = md({
tabWidth
:
4
})
.
use
(
mdAttrs
)
.
use
(
mdMathjax
)
if
(
appconfig
.
features
.
mathjax
)
{
mkdown
.
use
(
mdMathjax
)
}
// Rendering rules
...
...
@@ -296,7 +300,11 @@ const parseContent = (content) => {
// Mathjax Post-processor
return
processMathjax
(
cr
.
html
())
if
(
appconfig
.
features
.
mathjax
)
{
return
processMathjax
(
cr
.
html
())
}
else
{
return
Promise
.
resolve
(
cr
.
html
())
}
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment