Compare commits

..

No commits in common. "e7d2c0e1a931c20bd73279dddd3296ebaf3978be" and "79aba57dcbd65e8fc0d0bfbb4de71f5301cfadd7" have entirely different histories.

2 changed files with 6 additions and 19 deletions

View File

@ -3,7 +3,7 @@ import moment from 'moment'
import './styles.scss' import './styles.scss'
import Editor from './editor' import Editor from './editor'
import MD from './markdown' import MD from './markdown'
// import wikiGraph from "./graph"; import wikiGraph from "./graph";
import "./sr"; import "./sr";
moment.locale('nl') moment.locale('nl')
@ -11,9 +11,9 @@ moment.locale('nl')
// PrismJS.plugins.filterHighlightAll.reject.addSelector('.language-mermaid') // PrismJS.plugins.filterHighlightAll.reject.addSelector('.language-mermaid')
// PrismJS.plugins.filterHighlightAll.reject.addSelector('.language-dot') // PrismJS.plugins.filterHighlightAll.reject.addSelector('.language-dot')
// $(function () { $(function () {
// setTimeout(() => wikiGraph('.graph-network'), 1); setTimeout(() => wikiGraph('.graph-network'), 1);
// }) })
/* /*
* EVENTS * EVENTS

View File

@ -237,10 +237,6 @@ function editor(root, inputData, options) {
return {indented: indented, text: '', fold: 'open', hidden: false} return {indented: indented, text: '', fold: 'open', hidden: false}
} }
function hasMarkdown(text) {
return text.match(/[^a-zA-Z0-9 .,!@$&"'?]/)
}
function newItem(value) { function newItem(value) {
let el = document.createElement('div') let el = document.createElement('div')
el.classList.add('list-item') el.classList.add('list-item')
@ -257,11 +253,7 @@ function editor(root, inputData, options) {
line.prepend(content) line.prepend(content)
if (hasMarkdown(value.text)) { options.transform(value.text, $(content), value.id, EDITOR)
options.transform(value.text, $(content), value.id, EDITOR)
} else {
$(content).html(value.text)
}
let marker = document.createElement('span') let marker = document.createElement('span')
marker.classList.add('marker') marker.classList.add('marker')
@ -351,12 +343,7 @@ function editor(root, inputData, options) {
value.hidden = value.indented >= hideLevel value.hidden = value.indented >= hideLevel
let $content = $li.find('.content'); options.transform(value.text, $li.find('.content'), value.id, EDITOR)
if (hasMarkdown(value.text)) {
options.transform(value.text, $content, value.id, EDITOR)
} else {
$content.html(value.text)
}
if (value.indented < hideLevel) { if (value.indented < hideLevel) {
if (value.fold !== 'open') { if (value.fold !== 'open') {