Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mdbot/wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
greboid committed Apr 26, 2021
2 parents 8575971 + 6216873 commit e8e2206
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ require (
github.com/gorilla/sessions v1.2.1
github.com/kouhin/envflag v0.0.0-20150818174321-0e9a86061649
github.com/litao91/goldmark-mathjax v0.0.0-20210217064022-a43cf739a50f
github.com/mdigger/goldmark-attributes v0.0.0-20191228154645-1cb795f70464
github.com/microcosm-cc/bluemonday v1.0.5
github.com/sergi/go-diff v1.2.0
github.com/yalue/merged_fs v1.0.5
Expand Down
3 changes: 3 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mdigger/goldmark-attributes v0.0.0-20191228154645-1cb795f70464 h1:wheO1fGAWnnOmBNhi6CjfLBPfUULxQLJKtNfMNp3hZ8=
github.com/mdigger/goldmark-attributes v0.0.0-20191228154645-1cb795f70464/go.mod h1:1TprW+/BlaLDtiFAhtRHXHGa8mAzy1VgLwgEhBPys4M=
github.com/microcosm-cc/bluemonday v1.0.5 h1:cF59UCKMmmUgqN1baLvqU/B1ZsMori+duLVTLpgiG3w=
github.com/microcosm-cc/bluemonday v1.0.5/go.mod h1:8iwZnFn2CDDNZ0r6UXhF4xawGvzaqzCRa1n3/lO3W2w=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
Expand Down Expand Up @@ -126,6 +128,7 @@ github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI
github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0=
github.com/yalue/merged_fs v1.0.5 h1:guytDJUNPcSfw8Fsfc6TqoNMRkdmcoJzDmHa/WlasWc=
github.com/yalue/merged_fs v1.0.5/go.mod h1:WqqchfVYQyclV2tnR7wtRhBddzBvLVR83Cjw9BKQw0M=
github.com/yuin/goldmark v1.1.18/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.22/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.3 h1:37BdQwPx8VOSic8eDSWee6QL9mRpZRm9VJp/QugNrW0=
Expand Down
2 changes: 2 additions & 0 deletions markdown/renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"

mathjax "github.com/litao91/goldmark-mathjax"
"github.com/mdigger/goldmark-attributes"
"github.com/microcosm-cc/bluemonday"
"github.com/yuin/goldmark"
highlighting "github.com/yuin/goldmark-highlighting"
Expand Down Expand Up @@ -38,6 +39,7 @@ func NewRenderer(checker PageChecker, dangerousHtml bool, codeStyle string) *Ren
highlighting.NewHighlighting(highlighting.WithStyle(codeStyle)),
newWikiLinks(checker),
newEmbedExtension(),
attributes.Extension,
),
goldmark.WithParserOptions(
parser.WithAutoHeadingID(),
Expand Down
1 change: 1 addition & 0 deletions resources/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ document.addEventListener('DOMContentLoaded', function () {
theme: theme,
mode: 'gfm',
extraKeys: { 'Enter': 'newlineAndIndentContinueMarkdownList' },
lineWrapping: true,
})
const uploadFile = (file) => {
return new Promise(function (resolve, reject) {
Expand Down
2 changes: 1 addition & 1 deletion resources/static/editor.js

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion resources/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ body > nav.sidebar {
grid-area: sidebar;
}

input,textarea {
input, textarea, .CodeMirror {
background-color: var(--input-background);
color: var(--input-color);
border: 1px solid var(--input-border);
Expand Down Expand Up @@ -277,3 +277,8 @@ blockquote > p:last-child {
background-color: var(--diff-remove-colour);
text-decoration: none;
}

.thumbnail img, .thumbnail video {
max-width: 200px;
max-height: 200px;
}

0 comments on commit e8e2206

Please sign in to comment.