sunny-html-editor 1.2.3 → 1.2.4

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/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # Sunny HTML Editor
2
2
 
3
- 軽量WYSIWYGエディタ。既存のHTMLに編集機能を後付けで追加できます。Markdown変換にも対応。
3
+ 軽量WYSIWYGエディタ。Markdown変換対応。
4
4
 
5
5
  ## バージョン履歴
6
6
 
7
+ - **1.2.4** - h1改行を最初の「-」「_」のみに限定
7
8
  - **1.2.3** - サイドバーh1の改行(br)維持を修正
8
9
  - **1.2.2** - パッケージ修正
9
10
  - **1.2.1** - h1の「_」区切り改行対応
10
- - **1.2.0** - Markdown変換機能追加(`data-markdown`属性対応)
11
- - **1.1.0** - ツールバー・コンテキストメニュー自動生成、外部ライブラリ遅延読み込み
11
+ - **1.2.0** - Markdown変換機能追加
12
12
 
13
13
  ## ライセンス
14
14
 
package/html-editor.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Sunny HTML Editor - 軽量WYSIWYGエディタ
3
- * @version 1.2.3
3
+ * @version 1.2.4
4
4
  */
5
5
 
6
6
  // ========== HTML生成関数 ==========
@@ -190,7 +190,7 @@ function convertMarkdownToHtml(md) {
190
190
  if (/^#\s+/.test(line) && !/^##/.test(line)) {
191
191
  line = line.replace(/^#\s+(.+)$/, function(match, title) {
192
192
  docTitle = title;
193
- var displayTitle = title.replace(/\s*[-_]\s*/g, '<br>');
193
+ var displayTitle = title.replace(/\s*[-_]\s*/, '<br>');
194
194
  return '<h1>' + displayTitle + '</h1>';
195
195
  });
196
196
  }
@@ -958,7 +958,7 @@ document.addEventListener('DOMContentLoaded', function() {
958
958
  if (sidebarH1) {
959
959
  var h1Html = mainH1.innerHTML;
960
960
  if (!/<br[\s\/]*>/i.test(h1Html)) {
961
- h1Html = mainH1.textContent.replace(/\s*[-_]\s*/g, '<br>');
961
+ h1Html = mainH1.textContent.replace(/\s*[-_]\s*/, '<br>');
962
962
  }
963
963
  sidebarH1.innerHTML = h1Html;
964
964
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sunny-html-editor",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "軽量WYSIWYGエディタ - 既存のHTMLに編集機能を後付けで追加、Markdown変換対応",
5
5
  "main": "html-editor.js",
6
6
  "files": [
@@ -16,18 +16,5 @@
16
16
  "markdown"
17
17
  ],
18
18
  "author": "",
19
- "license": "MIT",
20
- "optionalDependencies": {
21
- "exceljs": "^4.3.0",
22
- "jspdf": "^2.5.1",
23
- "html2canvas": "^1.4.1"
24
- },
25
- "repository": {
26
- "type": "git",
27
- "url": ""
28
- },
29
- "bugs": {
30
- "url": ""
31
- },
32
- "homepage": ""
19
+ "license": "MIT"
33
20
  }