@riebeckite/plugin-code-annotations 0.0.19 → 0.0.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.
- package/README.md +1 -1
- package/README_ja.md +1 -1
- package/dist/index.js +3 -2
- package/package.json +3 -3
package/README.md
CHANGED
package/README_ja.md
CHANGED
|
@@ -132,6 +132,6 @@ codeAnnotations({ highlightClassName: "is-highlighted" });
|
|
|
132
132
|
|
|
133
133
|
## 関連資料
|
|
134
134
|
|
|
135
|
-
- [プラグインシステム](../../../docs/docs/reference/plugin-api.md)
|
|
135
|
+
- [プラグインシステム](../../../docs/docs/reference/plugin-api.ja.md)
|
|
136
136
|
- [`@riebeckite/plugin-code-enhance`](../code-enhance/README_ja.md)
|
|
137
137
|
|
package/dist/index.js
CHANGED
|
@@ -25,6 +25,7 @@ function resolveCodeAnnotationsOptions(options = {}) {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
// src/annotations.ts
|
|
28
|
+
import { scanMarkdownFenceLines } from "@riebeckite/core";
|
|
28
29
|
var ANNOTATIONS_META_PREFIX = "rb-annotations=";
|
|
29
30
|
var ANNOTATION_KEYS = [
|
|
30
31
|
"highlight",
|
|
@@ -83,8 +84,8 @@ function stripInlineCodeAnnotation(line) {
|
|
|
83
84
|
function collectCodeAnnotations(meta, code) {
|
|
84
85
|
const plan = parseCodeAnnotations(meta);
|
|
85
86
|
const strippedLines = [];
|
|
86
|
-
code
|
|
87
|
-
const { line, annotation } = stripInlineCodeAnnotation(rawLine);
|
|
87
|
+
scanMarkdownFenceLines(code).forEach(({ value: rawLine, inFence }, index) => {
|
|
88
|
+
const { line, annotation } = inFence ? { line: rawLine, annotation: null } : stripInlineCodeAnnotation(rawLine);
|
|
88
89
|
strippedLines.push(line);
|
|
89
90
|
if (!annotation) return;
|
|
90
91
|
const lineNumber = index + 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riebeckite/plugin-code-annotations",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"./style.css": "./style.css"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@riebeckite/core": "0.0.
|
|
18
|
+
"@riebeckite/core": "0.0.21"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"tsx": "^4.22.4",
|
|
22
|
-
"@riebeckite/test": "0.0.
|
|
22
|
+
"@riebeckite/test": "0.0.21"
|
|
23
23
|
},
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|