ponkotsu-md-editor 0.2.19 → 0.2.21

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8b5a1994ce4fd6b3d3a5faf5fe00ae1d92da000e91f52344a3b893ff065ad32
4
- data.tar.gz: 7b4669d5747735f1af7731afcddfd0d769411783a9c70c28dd1c2a4d5562bf49
3
+ metadata.gz: 7aa56320e6fd84594858fd5472595f9c5084d808a53bcf77e1a3653d4c4fb780
4
+ data.tar.gz: f89f5e9b93bb22b278b3e9f2aa33ce8fae9d171162ca99e3c2c4a41769800222
5
5
  SHA512:
6
- metadata.gz: fe582476d1b43583ad036a61bd7365fcd794ad36cc7ef6781cc065bf50045bb781d74ebd3ae9d771da39946ae5e09feed9a536d7bf402c4348802291e7f5c252
7
- data.tar.gz: b988e6f3779623f012157f3bc439c9a1ab78224f362ded5d8d7d36eedc9a2d6d12d8d4cde553d1754ebb7d0c813431d426f7f4aaa916fb4c3be34bc1fffe9f35
6
+ metadata.gz: cd5da7dc37050f394c5a8f6bed08fcc959ef430c100cf7533a297e3179f0a0aa930ce56d58426a78eb3e42f9a4329799a9a48b4786ed6904056a48746934a0c7
7
+ data.tar.gz: f977aa5d83ee4f310a746c73a2f27ee8aa78304cec65811245c8f3f7124a9faca42222951abb38c29a85518328e0c220c536d688a7756beb46b9599fcc554efd
@@ -4,6 +4,8 @@
4
4
  // _scanOffsetCacheをローカル変数として閉じる
5
5
  let _scanOffsetCache = new Map();
6
6
 
7
+ const analyzeHtmlCache = new Map();
8
+
7
9
  // Debounce function for delayed execution
8
10
  function debounce(func, wait) {
9
11
  let timeout;
@@ -74,6 +76,8 @@
74
76
  return _scanOffsetCache.get(pos);
75
77
  }
76
78
 
79
+ const textarea = document.getElementById('editor_content');
80
+
77
81
  // HTML全体を一度だけ取得(これは良い改善)
78
82
  const fullHTML = textarea.innerHTML;
79
83
  const fullText = textarea.innerText;
@@ -733,8 +737,6 @@
733
737
  }
734
738
  }
735
739
 
736
- const analyzeHtmlCache = new Map();
737
-
738
740
  function analyzeHtml(target, isCountEmptyDiv = false) {
739
741
 
740
742
  const cacheKey = `${target}_${isCountEmptyDiv}`;
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PonkotsuMdEditor
4
- VERSION = "0.2.19"
4
+ VERSION = "0.2.21"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ponkotsu-md-editor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.19
4
+ version: 0.2.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - dhq_boiler