zenn-markdown-html 0.1.161 → 0.1.162-alpha.1

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.
@@ -1,4 +1,4 @@
1
- import MarkdownIt from "markdown-it";
1
+ import MarkdownIt from 'markdown-it';
2
2
  /**
3
3
  * Adds begin line index to the output via the 'data-line' data attribute.
4
4
  *
@@ -11,11 +11,11 @@ exports.mdSourceMap = mdSourceMap;
11
11
  */
12
12
  function mdSourceMap(md) {
13
13
  // Set the attribute on every possible token.
14
- md.core.ruler.push("source_map_data_attribute", state => {
14
+ md.core.ruler.push('source_map_data_attribute', state => {
15
15
  for (const token of state.tokens) {
16
- if (token.map && token.type !== "inline") {
17
- token.attrSet("data-line", String(token.map[0]));
18
- token.attrJoin("class", "code-line");
16
+ if (token.map && token.type !== 'inline') {
17
+ token.attrSet('data-line', String(token.map[0]));
18
+ token.attrJoin('class', 'code-line');
19
19
  }
20
20
  }
21
21
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zenn-markdown-html",
3
- "version": "0.1.161",
3
+ "version": "0.1.162-alpha.1",
4
4
  "license": "MIT",
5
5
  "description": "Convert markdown to zenn flavor html.",
6
6
  "main": "lib/index.js",
@@ -21,11 +21,15 @@
21
21
  "build": "npm run clean && run-p build:*",
22
22
  "build:src": "babel ./src --extensions '.ts,.tsx' --ignore '**/*.d.ts' --out-dir ./lib",
23
23
  "build:types": "tsc --project ./tsconfig.build.json",
24
- "lint": "eslint . --ext .ts,.tsx",
24
+ "lint": "run-s lint:*",
25
+ "lint:eslint": "eslint . --ext .ts,.tsx",
25
26
  "lint:prettier": "prettier .",
26
- "fix": "eslint . --ext .ts,.tsx --fix",
27
+ "lint-strict": "run-s lint-strict:*",
28
+ "lint-strict:eslint": "eslint . --ext .ts,.tsx --max-warnings 0",
29
+ "lint-strict:prettier": "prettier --check .",
30
+ "fix": "run-s fix:*",
31
+ "fix:eslint": "eslint . --ext .ts,.tsx --fix",
27
32
  "fix:prettier": "prettier -w .",
28
- "strict:lint": "eslint . --ext .ts,.tsx --max-warnings 0",
29
33
  "test": "vitest run"
30
34
  },
31
35
  "devDependencies": {
@@ -60,7 +64,7 @@
60
64
  "prismjs": "^1.29.0",
61
65
  "sanitize-html": "^2.9.0"
62
66
  },
63
- "gitHead": "743a5f1677cb17c25504be97f1e8fd5824d3e1a6",
67
+ "gitHead": "be12562b44d7be506ca1bef971428d77bbc4f41b",
64
68
  "publishConfig": {
65
69
  "access": "public"
66
70
  }