@riebeckite/plugin-highlight 0.0.31 → 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
@@ -41,6 +41,10 @@ Highlights are matched non-greedily, must stay on a single line, and are
41
41
  ignored when they are empty or contain only whitespace. Matches inside code
42
42
  blocks, inline code, raw HTML, and frontmatter are left untouched.
43
43
 
44
+ ## Live example
45
+
46
+ A sentence with an ==emphasized phrase== and a second ==highlight==.
47
+
44
48
  ## Options
45
49
 
46
50
  | Option | Type | Default | Description |
@@ -84,7 +88,7 @@ the appearance.
84
88
  ## Exports
85
89
 
86
90
  - `highlight(options?)` — plugin factory
87
- - `highlightPlugin` — alias of `highlight`
91
+ - `highlight` — alias of `highlight`
88
92
  - `remarkHighlight(options?)` — the underlying remark transformer
89
93
  - Type: `HighlightOptions`
90
94
 
package/README_ja.md CHANGED
@@ -9,11 +9,11 @@
9
9
 
10
10
  ## 概要
11
11
 
12
- `highlight()` は、Markdown のテキストノードにある `==テキスト==` を HTML に
12
+ `highlight()` は、Markdown のテキストノードにある `==テキスト==` を、HTML へ
13
13
  変換する前に生の HTML へ置き換える remark トランスフォーマーを登録します。
14
- `~~打ち消し線~~` だけを扱う `remark-gfm` を補完します。
14
+ `~~打ち消し線~~` しか扱わない `remark-gfm` を補います。
15
15
 
16
- ## 設定する
16
+ ## 使い方
17
17
 
18
18
  ```ts
19
19
  import { defineConfig } from "@riebeckite/core";
@@ -37,10 +37,14 @@ export default defineConfig({
37
37
  この文には <mark class="rb-highlight">ハイライトする語句</mark> が含まれます。
38
38
  ```
39
39
 
40
- ハイライトは非貪欲に一致し、改行をまたぎません。空、または空白だけの
40
+ ハイライトは最短一致で、改行をまたぎません。空、または空白だけの
41
41
  ハイライトは無視します。コードブロック、インラインコード、生の HTML、
42
42
  frontmatter の内部は変更しません。
43
43
 
44
+ ## 実行例
45
+
46
+ 文中の ==強調したい語句== と、もう 1 つの ==ハイライト== がこのように表示されます。
47
+
44
48
  ## オプション
45
49
 
46
50
  | 項目 | 型 | 既定値 | 説明 |
@@ -84,7 +88,7 @@ highlight({ className: "my-highlight", tag: "span" });
84
88
  ## 主なエクスポート
85
89
 
86
90
  - `highlight(options?)`: プラグインを作成する
87
- - `highlightPlugin`: `highlight` の別名
91
+ - `highlight`: `highlight` の別名
88
92
  - `remarkHighlight(options?)`: 内部の remark トランスフォーマー
89
93
  - 型: `HighlightOptions`
90
94
 
package/dist/index.d.ts CHANGED
@@ -2,5 +2,3 @@ import type { HighlightOptions } from "./src/types.js";
2
2
  export { remarkHighlight } from "./src/remark.js";
3
3
  export type { HighlightOptions } from "./src/types.js";
4
4
  export declare function highlight(options?: HighlightOptions): import("@riebeckite/core").RiebeckitePlugin<HighlightOptions>;
5
- /** Alias kept for parity with plugins that export a `…Plugin` factory. */
6
- export declare const highlightPlugin: typeof highlight;
package/dist/index.js CHANGED
@@ -87,7 +87,6 @@ function highlight(options = {}) {
87
87
  ]
88
88
  });
89
89
  }
90
- var highlightPlugin = highlight;
91
90
  function validateHighlightOptions(options) {
92
91
  if (!options) return [];
93
92
  const issues = [];
@@ -104,6 +103,5 @@ function validateHighlightOptions(options) {
104
103
  }
105
104
  export {
106
105
  highlight,
107
- highlightPlugin,
108
106
  remarkHighlight
109
107
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-highlight",
3
- "version": "0.0.31",
3
+ "version": "0.0.33",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -15,13 +15,13 @@
15
15
  "./style.css": "./style.css"
16
16
  },
17
17
  "dependencies": {
18
+ "@riebeckite/core": "0.0.33",
18
19
  "@types/mdast": "^4.0.4",
19
- "unist-util-visit": "^5.1.0",
20
- "@riebeckite/core": "0.0.31"
20
+ "unist-util-visit": "^5.1.0"
21
21
  },
22
22
  "devDependencies": {
23
- "tsx": "^4.22.4",
24
- "@riebeckite/test": "0.0.31"
23
+ "@riebeckite/test": "0.0.33",
24
+ "tsx": "^4.22.4"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"