Compare commits
No commits in common. "a4bff99ceecfad33f69d2d227404bc6bfd1cd4b8" and "70f1b626460f9effd6dd2cfc9b8a5a14cafcc2e6" have entirely different histories.
a4bff99cee
...
70f1b62646
|
|
@ -388,9 +388,9 @@ function Editor(holder, input) {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const todoItem = $.parseHTML(converted)
|
const todoItem = $(converted).find(':checkbox')
|
||||||
if (todoItem.length && $(todoItem[0]).is(':checkbox')) {
|
if (todoItem.length) {
|
||||||
const todo = !$(todoItem[0]).is(':checked')
|
const todo = !todoItem.is(':checked')
|
||||||
element.toggleClass('todo--done', todo === false)
|
element.toggleClass('todo--done', todo === false)
|
||||||
element.toggleClass('todo--todo', todo === true)
|
element.toggleClass('todo--todo', todo === true)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ Plugin.prototype.render = function (tokens, id, options, env) {
|
||||||
return '<input type="checkbox" class="checkbox" checked>';
|
return '<input type="checkbox" class="checkbox" checked>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return '<a href="/' + link.replace(' ', '_') + '" class="wiki-link">' + (tag ? '#' : '') + link + '</a>';
|
return '<a href="/' + link.replace(' ', '_') + '" class="wiki-link">' + link + '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
export default (options) => {
|
export default (options) => {
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,4 @@ describe('MD', function () {
|
||||||
it('parseLinks 6', function () {
|
it('parseLinks 6', function () {
|
||||||
assert.deepStrictEqual(MD.renderInline("test [[test]] [[test2]]"), 'test <a href="/test" class="wiki-link">test</a> <a href="/test2" class="wiki-link">test2</a>')
|
assert.deepStrictEqual(MD.renderInline("test [[test]] [[test2]]"), 'test <a href="/test" class="wiki-link">test</a> <a href="/test2" class="wiki-link">test2</a>')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('parseLinks tag', function () {
|
|
||||||
assert.deepStrictEqual(MD.renderInline("test #[[test]]"), 'test <a href="/test" class="wiki-link">#test</a>')
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user