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

View File

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