@honkit/asciidoc 3.6.16 → 4.0.0

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.
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const fs_1 = __importDefault(require("fs"));
7
+ const path_1 = __importDefault(require("path"));
8
+ const assert_1 = __importDefault(require("assert"));
9
+ const glossary = require("../").glossary;
10
+ let LEXED;
11
+ beforeAll(() => {
12
+ const CONTENT = fs_1.default.readFileSync(path_1.default.join(__dirname, "fixtures/GLOSSARY.adoc"), "utf8");
13
+ LEXED = glossary(CONTENT);
14
+ });
15
+ it("should only get heading + paragraph pairs", () => {
16
+ assert_1.default.equal(LEXED.length, 4);
17
+ });
18
+ it("should output simple name/description objects", () => {
19
+ assert_1.default.equal(true, !LEXED.some((e) => {
20
+ return !Boolean(e.name && e.description);
21
+ }));
22
+ });
23
+ it("should correctly convert it to text", () => {
24
+ const text = glossary.toText(LEXED);
25
+ assert_1.default.deepEqual(glossary(text), LEXED);
26
+ });
package/lib/toHTML.js CHANGED
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const asciidoctor_1 = __importDefault(require("asciidoctor"));
7
- const asciidoctor = asciidoctor_1.default();
7
+ const asciidoctor = (0, asciidoctor_1.default)();
8
8
  // Render Asciidoc to HTML (block)
9
9
  function asciidocToHTML(content) {
10
10
  return asciidoctor.convert(content, { safe: "server", attributes: { showtitle: "", icons: "font@" } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@honkit/asciidoc",
3
- "version": "3.6.16",
3
+ "version": "4.0.0",
4
4
  "description": "Parse AsciiDoc content for gitbook",
5
5
  "homepage": "https://github.com/honkit/honkit",
6
6
  "bugs": {
@@ -36,16 +36,16 @@
36
36
  "prepublish": "npm run --if-present build"
37
37
  },
38
38
  "dependencies": {
39
- "@honkit/html": "^3.6.16",
39
+ "@honkit/html": "^4.0.0",
40
40
  "asciidoctor": "^2.2.0",
41
41
  "lodash": "^4.13.1"
42
42
  },
43
43
  "devDependencies": {
44
- "mocha": "^8.0.1"
44
+ "mocha": "^8.2.1"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
49
  "authors": "azu <azuciao@gmail.com>",
50
- "gitHead": "e6b3edfbb55b3d7dd658bcdcae670ed152066c2f"
50
+ "gitHead": "32e906fc392accc23940e99e284efea005398544"
51
51
  }
package/CHANGELOG.md DELETED
@@ -1,118 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## 3.6.16 (2020-12-15)
7
-
8
- **Note:** Version bump only for package @honkit/asciidoc
9
-
10
-
11
-
12
-
13
-
14
- ## 3.6.15 (2020-12-05)
15
-
16
- **Note:** Version bump only for package @honkit/asciidoc
17
-
18
-
19
-
20
-
21
-
22
- ## 3.6.14 (2020-11-29)
23
-
24
- **Note:** Version bump only for package @honkit/asciidoc
25
-
26
-
27
-
28
-
29
-
30
- ## 3.6.13 (2020-11-17)
31
-
32
-
33
- ### Bug Fixes
34
-
35
- * **honkit:** browser print layout in default theme ([#159](https://github.com/honkit/honkit/issues/159)) ([672cb9c](https://github.com/honkit/honkit/commit/672cb9c92f90dd154793b7a36d4dbf2654e7aec4))
36
-
37
-
38
-
39
-
40
-
41
- ## 3.6.12 (2020-11-13)
42
-
43
- **Note:** Version bump only for package @honkit/asciidoc
44
-
45
-
46
-
47
-
48
-
49
- ## [3.5.5](https://github.com/honkit/honkit/compare/v3.5.4...v3.5.5) (2020-08-02)
50
-
51
- **Note:** Version bump only for package @honkit/asciidoc
52
-
53
-
54
-
55
-
56
-
57
- ## [3.5.4](https://github.com/honkit/honkit/compare/v3.5.3...v3.5.4) (2020-08-01)
58
-
59
-
60
- ### Bug Fixes
61
-
62
- * add prepublish script ([810fcc7](https://github.com/honkit/honkit/commit/810fcc7f45f3b1ab8d9527e8738f9861fdbe2c31))
63
-
64
-
65
-
66
-
67
-
68
- ## [3.5.1](https://github.com/honkit/honkit/compare/v3.5.0...v3.5.1) (2020-07-04)
69
-
70
- **Note:** Version bump only for package @honkit/asciidoc
71
-
72
-
73
-
74
-
75
-
76
- ## [3.4.1](https://github.com/honkit/honkit/compare/v3.4.0...v3.4.1) (2020-06-29)
77
-
78
- **Note:** Version bump only for package @honkit/asciidoc
79
-
80
-
81
-
82
-
83
-
84
- ## [3.3.11](https://github.com/honkit/honkit/compare/v3.3.10...v3.3.11) (2020-06-27)
85
-
86
- **Note:** Version bump only for package @honkit/asciidoc
87
-
88
-
89
-
90
-
91
-
92
- ## [3.3.8](https://github.com/honkit/honkit/compare/v3.3.7...v3.3.8) (2020-06-18)
93
-
94
- **Note:** Version bump only for package @honkit/asciidoc
95
-
96
-
97
-
98
-
99
-
100
- ## [3.3.7](https://github.com/honkit/honkit/compare/v3.3.6...v3.3.7) (2020-06-18)
101
-
102
- **Note:** Version bump only for package @honkit/asciidoc
103
-
104
-
105
-
106
-
107
-
108
- ## [3.3.4](https://github.com/honkit/honkit/compare/v3.3.3...v3.3.4) (2020-06-17)
109
-
110
- **Note:** Version bump only for package @honkit/asciidoc
111
-
112
-
113
-
114
-
115
-
116
- # 3.3.0 (2020-06-14)
117
-
118
- **Note:** Version bump only for package @honkit/asciidoc