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
package/dist/overtype.js
CHANGED
|
@@ -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
|
|
@@ -131,7 +131,7 @@ var OverType = (() => {
|
|
|
131
131
|
return html.replace(/^((?: )*)-\s+\[([ xX])\]\s+(.+)$/, (match, indent, checked, content) => {
|
|
132
132
|
if (isPreviewMode) {
|
|
133
133
|
const isChecked = checked.toLowerCase() === "x";
|
|
134
|
-
return `${indent}<li class="task-list"><input type="checkbox"
|
|
134
|
+
return `${indent}<li class="task-list"><input type="checkbox" ${isChecked ? "checked" : ""}> ${content}</li>`;
|
|
135
135
|
} else {
|
|
136
136
|
return `${indent}<li class="task-list"><span class="syntax-marker">- [${checked}] </span>${content}</li>`;
|
|
137
137
|
}
|
|
@@ -4003,6 +4003,7 @@ ${blockSuffix}` : suffix;
|
|
|
4003
4003
|
*/
|
|
4004
4004
|
showNormalEditMode() {
|
|
4005
4005
|
this.container.dataset.mode = "normal";
|
|
4006
|
+
this.updatePreview();
|
|
4006
4007
|
requestAnimationFrame(() => {
|
|
4007
4008
|
this.textarea.scrollTop = this.preview.scrollTop;
|
|
4008
4009
|
this.textarea.scrollLeft = this.preview.scrollLeft;
|
|
@@ -4030,6 +4031,7 @@ ${blockSuffix}` : suffix;
|
|
|
4030
4031
|
*/
|
|
4031
4032
|
showPreviewMode() {
|
|
4032
4033
|
this.container.dataset.mode = "preview";
|
|
4034
|
+
this.updatePreview();
|
|
4033
4035
|
return this;
|
|
4034
4036
|
}
|
|
4035
4037
|
/**
|