From a6412a18f968fdbfa394bf90fd3f436f8b062b97 Mon Sep 17 00:00:00 2001
From: progfay <19568747+progfay@users.noreply.github.com>
Date: Sat, 10 May 2025 03:01:04 +0900
Subject: [PATCH 1/2] add `/docs`
---
docs/index.html | 102 ++++++++++++++++++++++++++++++++++++++++++++++++
docs/script.js | 13 ++++++
2 files changed, 115 insertions(+)
create mode 100644 docs/index.html
create mode 100644 docs/script.js
diff --git a/docs/index.html b/docs/index.html
new file mode 100644
index 00000000..7fb4c8af
--- /dev/null
+++ b/docs/index.html
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+
+ scrapbox-parser
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/script.js b/docs/script.js
new file mode 100644
index 00000000..2a047dea
--- /dev/null
+++ b/docs/script.js
@@ -0,0 +1,13 @@
+import { parse } from "https://unpkg.com/@progfay/scrapbox-parser";
+import hljs from "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/es/highlight.min.js";
+
+document.getElementById("parse-button").addEventListener("click", () => {
+ const parsedJson = JSON.stringify(
+ parse(document.getElementById("plain-text").value),
+ null,
+ 2
+ ).trim();
+ const a = hljs.highlight(parsedJson, { language: "json" }).value;
+ console.log(a);
+ document.querySelector("#parsed-json>.json").innerHTML = a;
+});
From c532264301ea6a41dab8d849c8c08fc3bcfec884 Mon Sep 17 00:00:00 2001
From: progfay <19568747+progfay@users.noreply.github.com>
Date: Sat, 10 May 2025 03:01:37 +0900
Subject: [PATCH 2/2] `npm run format`
---
docs/script.js | 18 +++++++++---------
package.json | 9 ++-------
2 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/docs/script.js b/docs/script.js
index 2a047dea..ed242ecb 100644
--- a/docs/script.js
+++ b/docs/script.js
@@ -1,13 +1,13 @@
-import { parse } from "https://unpkg.com/@progfay/scrapbox-parser";
import hljs from "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/es/highlight.min.js";
+import { parse } from "https://unpkg.com/@progfay/scrapbox-parser";
document.getElementById("parse-button").addEventListener("click", () => {
- const parsedJson = JSON.stringify(
- parse(document.getElementById("plain-text").value),
- null,
- 2
- ).trim();
- const a = hljs.highlight(parsedJson, { language: "json" }).value;
- console.log(a);
- document.querySelector("#parsed-json>.json").innerHTML = a;
+ const parsedJson = JSON.stringify(
+ parse(document.getElementById("plain-text").value),
+ null,
+ 2,
+ ).trim();
+ const a = hljs.highlight(parsedJson, { language: "json" }).value;
+ console.log(a);
+ document.querySelector("#parsed-json>.json").innerHTML = a;
});
diff --git a/package.json b/package.json
index 8ca5e246..c23aa1fa 100644
--- a/package.json
+++ b/package.json
@@ -3,9 +3,7 @@
"version": "10.0.0",
"type": "module",
"description": "parse Scrapbox notation to JavaScript Object",
- "files": [
- "dist"
- ],
+ "files": ["dist"],
"types": "./dist/index.d.ts",
"exports": {
".": "./dist/index.js",
@@ -33,10 +31,7 @@
"type": "git",
"url": "git+https://github.com/progfay/scrapbox-parser.git"
},
- "keywords": [
- "scrapbox",
- "parser"
- ],
+ "keywords": ["scrapbox", "parser"],
"author": "progfay",
"license": "MIT",
"bugs": {