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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * OverType v2.0.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" disabled ${isChecked ? "checked" : ""}> ${content}</li>`;
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
  /**