@riebeckite/plugin-hard-breaks 0.0.32 → 0.0.33

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
@@ -64,6 +64,16 @@ With `hardBreaks()`:
64
64
  明日も晴れるといいな。</p>
65
65
  ```
66
66
 
67
+ ## Live example
68
+
69
+ `hardBreaks()` is opt-in, so this site keeps the standard Markdown behavior: the three lines below render as one paragraph.
70
+
71
+ First line
72
+ Second line
73
+ Third line
74
+
75
+ With the plugin enabled, each line ends with `<br>` instead.
76
+
67
77
  ## Behavior
68
78
 
69
79
  | Input | Result |
@@ -94,7 +104,7 @@ Riebeckite's rendered pages.
94
104
  ## Exports
95
105
 
96
106
  - `hardBreaks()` — plugin factory
97
- - `hardBreaksPlugin` — alias of `hardBreaks`
107
+ - `hardBreaks` — alias of `hardBreaks`
98
108
 
99
109
  ## See also
100
110
 
package/README_ja.md CHANGED
@@ -11,12 +11,11 @@ Markdown の通常の改行を `<br>` 要素として出力するプラグイン
11
11
 
12
12
  標準の Markdown では、段落内の単一の改行はソフトブレークとなり、空白として
13
13
  描画されます。`hardBreaks()` は
14
- [`remark-breaks`](https://github.com/remarkjs/remark-breaks) のトランス
15
- フォーマーを Riebeckite の Markdown パイプラインに登録し、ソフトブレークを
16
- ビルド時に `<br>` 要素へ変換します。
14
+ [`remark-breaks`](https://github.com/remarkjs/remark-breaks) のトランスフォーマーを Riebeckite の Markdown
15
+ パイプラインに登録し、ソフトブレークをビルド時に `<br>` 要素へ変換します。
17
16
 
18
17
  変換は Markdown AST の段階で行われるため、コードブロック、インラインコード、
19
- 明示的な hard break の意味は変わりません。クライアント JavaScript と CSS は
18
+ 明示的なハードブレークの意味は変わりません。クライアント側の JavaScript と CSS は
20
19
  追加しません。
21
20
 
22
21
  ## インストール
@@ -32,7 +31,7 @@ export default defineConfig({
32
31
  ```
33
32
 
34
33
  `riebeckite.config.ts` の `plugins` 配列に `hardBreaks()` を追加します。この
35
- プラグインは opt-in です。追加しない場合、パイプラインは標準の Markdown の
34
+ プラグインはオプトインです。追加しない場合、パイプラインは標準の Markdown の
36
35
  ソフトブレークの挙動を維持します。
37
36
 
38
37
  ## 使い方
@@ -64,18 +63,28 @@ hardBreaks();
64
63
  明日も晴れるといいな。</p>
65
64
  ```
66
65
 
66
+ ## 実行例
67
+
68
+ `hardBreaks()` は opt-in なので、このサイトでは標準の Markdown の挙動のままです。次の 3 行は 1 つの段落として描画されます。
69
+
70
+ 1 行目
71
+ 2 行目
72
+ 3 行目
73
+
74
+ プラグインを有効にすると、各行の末尾に `<br>` が入ります。
75
+
67
76
  ## 動作仕様
68
77
 
69
78
  | 入力 | 動作 |
70
79
  | --- | --- |
71
80
  | 段落内の単一の改行 | `<br>` に変換する |
72
81
  | 空行による段落の分割 | 従来どおり段落を分割する |
73
- | Fenced code block | 変更しない |
82
+ | フェンス付きコードブロック | 変更しない |
74
83
  | インラインコード | 変更しない |
75
84
  | 見出し | Markdown の見出し構造を維持する |
76
85
  | リスト項目内の改行 | Markdown AST の構造に従って処理する |
77
- | Blockquote 内の改行 | 通常の段落と同様に処理する |
78
- | 明示的な hard break(行末の空白 2 つ、または `\`) | 二重変換しない |
86
+ | 引用内の改行 | 通常の段落と同様に処理する |
87
+ | 明示的なハードブレーク(行末の空白 2 つ、または `\`) | 二重変換しない |
79
88
  | Markdown 内の HTML | そのまま扱う |
80
89
 
81
90
  ## 制約事項
@@ -93,7 +102,7 @@ Obsidian には「厳密な改行」という設定があります。これを
93
102
  ## 主なエクスポート
94
103
 
95
104
  - `hardBreaks()`: プラグインを作成する
96
- - `hardBreaksPlugin`: `hardBreaks` の別名
105
+ - `hardBreaks`: `hardBreaks` の別名
97
106
 
98
107
  ## 関連資料
99
108
 
package/dist/index.d.ts CHANGED
@@ -1,3 +1 @@
1
1
  export declare function hardBreaks(): import("@riebeckite/core").RiebeckitePlugin<unknown>;
2
- /** Alias kept for parity with plugins that export a `…Plugin` factory. */
3
- export declare const hardBreaksPlugin: typeof hardBreaks;
package/dist/index.js CHANGED
@@ -11,8 +11,6 @@ function hardBreaks() {
11
11
  remarkPlugins: [remarkBreaks]
12
12
  });
13
13
  }
14
- var hardBreaksPlugin = hardBreaks;
15
14
  export {
16
- hardBreaks,
17
- hardBreaksPlugin
15
+ hardBreaks
18
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-hard-breaks",
3
- "version": "0.0.32",
3
+ "version": "0.0.33",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -14,12 +14,12 @@
14
14
  }
15
15
  },
16
16
  "dependencies": {
17
- "remark-breaks": "^4.0.0",
18
- "@riebeckite/core": "0.0.32"
17
+ "@riebeckite/core": "0.0.33",
18
+ "remark-breaks": "^4.0.0"
19
19
  },
20
20
  "devDependencies": {
21
- "tsx": "^4.22.4",
22
- "@riebeckite/test": "0.0.32"
21
+ "@riebeckite/test": "0.0.33",
22
+ "tsx": "^4.22.4"
23
23
  },
24
24
  "publishConfig": {
25
25
  "access": "public"