overtype 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/overtype-webcomponent.esm.js +4 -2
- package/dist/overtype-webcomponent.esm.js.map +2 -2
- package/dist/overtype-webcomponent.js +4 -2
- package/dist/overtype-webcomponent.js.map +2 -2
- package/dist/overtype-webcomponent.min.js +9 -9
- package/dist/overtype.cjs +4 -2
- package/dist/overtype.cjs.map +2 -2
- package/dist/overtype.esm.js +4 -2
- package/dist/overtype.esm.js.map +2 -2
- package/dist/overtype.js +4 -2
- package/dist/overtype.js.map +2 -2
- package/dist/overtype.min.js +3 -3
- package/package.json +9 -5
- package/src/overtype.js +2 -0
- package/src/parser.js +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OverType v2.0.
|
|
2
|
+
* OverType v2.0.1
|
|
3
3
|
* A lightweight markdown editor library with perfect WYSIWYG alignment
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @author Demo User
|
|
@@ -105,7 +105,7 @@ var MarkdownParser = class {
|
|
|
105
105
|
return html.replace(/^((?: )*)-\s+\[([ xX])\]\s+(.+)$/, (match, indent, checked, content) => {
|
|
106
106
|
if (isPreviewMode) {
|
|
107
107
|
const isChecked = checked.toLowerCase() === "x";
|
|
108
|
-
return `${indent}<li class="task-list"><input type="checkbox"
|
|
108
|
+
return `${indent}<li class="task-list"><input type="checkbox" ${isChecked ? "checked" : ""}> ${content}</li>`;
|
|
109
109
|
} else {
|
|
110
110
|
return `${indent}<li class="task-list"><span class="syntax-marker">- [${checked}] </span>${content}</li>`;
|
|
111
111
|
}
|
|
@@ -3977,6 +3977,7 @@ var _OverType = class _OverType {
|
|
|
3977
3977
|
*/
|
|
3978
3978
|
showNormalEditMode() {
|
|
3979
3979
|
this.container.dataset.mode = "normal";
|
|
3980
|
+
this.updatePreview();
|
|
3980
3981
|
requestAnimationFrame(() => {
|
|
3981
3982
|
this.textarea.scrollTop = this.preview.scrollTop;
|
|
3982
3983
|
this.textarea.scrollLeft = this.preview.scrollLeft;
|
|
@@ -4004,6 +4005,7 @@ var _OverType = class _OverType {
|
|
|
4004
4005
|
*/
|
|
4005
4006
|
showPreviewMode() {
|
|
4006
4007
|
this.container.dataset.mode = "preview";
|
|
4008
|
+
this.updatePreview();
|
|
4007
4009
|
return this;
|
|
4008
4010
|
}
|
|
4009
4011
|
/**
|