obby-parser 0.1.2 → 1.0.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.
- package/LICENSE +21 -21
- package/README.md +40 -40
- package/dist/example.js +1 -0
- package/dist/example.js.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/example.ts +15 -13
- package/src/index.ts +51 -50
- package/test/parser.spec.ts +24 -24
- package/tsconfig.build.json +8 -8
- package/tsconfig.json +17 -17
- package/build/Release/addon.exp +0 -0
- package/build/Release/addon.iobj +0 -0
- package/build/Release/addon.ipdb +0 -0
- package/build/Release/addon.lib +0 -0
- package/build/Release/addon.node +0 -0
- package/build/Release/addon.pdb +0 -0
- package/build/Release/obj/addon/addon.node.recipe +0 -11
- package/build/Release/obj/addon/addon.tlog/CL.command.1.tlog +0 -0
- package/build/Release/obj/addon/addon.tlog/CL.read.1.tlog +0 -0
- package/build/Release/obj/addon/addon.tlog/CL.write.1.tlog +0 -0
- package/build/Release/obj/addon/addon.tlog/Cl.items.tlog +0 -2
- package/build/Release/obj/addon/addon.tlog/addon.lastbuildstate +0 -2
- package/build/Release/obj/addon/addon.tlog/link.command.1.tlog +0 -0
- package/build/Release/obj/addon/addon.tlog/link.read.1.tlog +0 -0
- package/build/Release/obj/addon/addon.tlog/link.secondary.1.tlog +0 -5
- package/build/Release/obj/addon/addon.tlog/link.write.1.tlog +0 -0
- package/build/Release/obj/addon/src/addon.obj +0 -0
- package/build/Release/obj/addon/win_delay_load_hook.obj +0 -0
- package/build/addon.vcxproj +0 -148
- package/build/addon.vcxproj.filters +0 -52
- package/build/binding.sln +0 -19
- package/test.html +0 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Caden McArthur
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Caden McArthur
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
# Obby-Parser
|
|
2
|
-
|
|
3
|
-
A simple TypeScript library for parsing Obsidian-style markdown. It converts `[[wikilinks]]` to HTML anchor tags and collects all unique links.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- Converts `[[Page Name]]` to `<a href="route/Page-Name">Page Name</a>`
|
|
8
|
-
- Collects all wikilinks in a Set
|
|
9
|
-
- Supports standard markdown formatting via [markdown-it](https://github.com/markdown-it/markdown-it)
|
|
10
|
-
|
|
11
|
-
## Installation
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npm install obsi-parser
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Usage
|
|
18
|
-
|
|
19
|
-
```typescript
|
|
20
|
-
import { parseMarkdown } from 'obsi-parser';
|
|
21
|
-
|
|
22
|
-
const markdown = "This references [[My Page]] and also **bold** text.";
|
|
23
|
-
const result = parseMarkdown(markdown, "pages/");
|
|
24
|
-
|
|
25
|
-
console.log(result.html); // HTML output with anchor tags
|
|
26
|
-
console.log(result.links_set); // Set { "My Page" }
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## API
|
|
30
|
-
|
|
31
|
-
### `parseMarkdown(markdown: string, route: string): ParseResult`
|
|
32
|
-
|
|
33
|
-
- `markdown`: The markdown string to parse.
|
|
34
|
-
- `route`: The base path for generated links.
|
|
35
|
-
- Returns:
|
|
36
|
-
- `html`: The resulting HTML string.
|
|
37
|
-
- `links_set`: A Set of all unique wikilinks found.
|
|
38
|
-
|
|
39
|
-
## License
|
|
40
|
-
|
|
1
|
+
# Obby-Parser
|
|
2
|
+
|
|
3
|
+
A simple TypeScript library for parsing Obsidian-style markdown. It converts `[[wikilinks]]` to HTML anchor tags and collects all unique links.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Converts `[[Page Name]]` to `<a href="route/Page-Name">Page Name</a>`
|
|
8
|
+
- Collects all wikilinks in a Set
|
|
9
|
+
- Supports standard markdown formatting via [markdown-it](https://github.com/markdown-it/markdown-it)
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install obsi-parser
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { parseMarkdown } from 'obsi-parser';
|
|
21
|
+
|
|
22
|
+
const markdown = "This references [[My Page]] and also **bold** text.";
|
|
23
|
+
const result = parseMarkdown(markdown, "pages/");
|
|
24
|
+
|
|
25
|
+
console.log(result.html); // HTML output with anchor tags
|
|
26
|
+
console.log(result.links_set); // Set { "My Page" }
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## API
|
|
30
|
+
|
|
31
|
+
### `parseMarkdown(markdown: string, route: string): ParseResult`
|
|
32
|
+
|
|
33
|
+
- `markdown`: The markdown string to parse.
|
|
34
|
+
- `route`: The base path for generated links.
|
|
35
|
+
- Returns:
|
|
36
|
+
- `html`: The resulting HTML string.
|
|
37
|
+
- `links_set`: A Set of all unique wikilinks found.
|
|
38
|
+
|
|
39
|
+
## License
|
|
40
|
+
|
|
41
41
|
MIT
|
package/dist/example.js
CHANGED
|
@@ -15,4 +15,5 @@ const content = fs_1.default.readFileSync(input, "utf8");
|
|
|
15
15
|
const result = (0, index_1.parseMarkdown)(content, "www.personalwebsite.com/test/");
|
|
16
16
|
console.log("HTML output:\n", result.html);
|
|
17
17
|
console.log("\nLinks found:", result.links_set);
|
|
18
|
+
console.log("json parsed", JSON.stringify(result.html));
|
|
18
19
|
//# sourceMappingURL=example.js.map
|
package/dist/example.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example.js","sourceRoot":"","sources":["../src/example.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,mCAAwC;AAExC,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC,CAAC;AACxE,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;IAC1B,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;IAC7C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AACD,MAAM,OAAO,GAAG,YAAE,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAC/C,MAAM,MAAM,GAAG,IAAA,qBAAa,EAAC,OAAO,EAAE,+BAA+B,CAAC,CAAC;AACvE,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;AAC3C,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"example.js","sourceRoot":"","sources":["../src/example.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,mCAAwC;AAExC,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC,CAAC;AACxE,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;IAC1B,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;IAC7C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AACD,MAAM,OAAO,GAAG,YAAE,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAC/C,MAAM,MAAM,GAAG,IAAA,qBAAa,EAAC,OAAO,EAAE,+BAA+B,CAAC,CAAC;AACvE,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;AAC3C,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;AAEhD,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -13,13 +13,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.parseMarkdown = parseMarkdown;
|
|
15
15
|
const markdown_it_1 = __importDefault(require("markdown-it"));
|
|
16
|
-
const md = new markdown_it_1.default();
|
|
16
|
+
const md = new markdown_it_1.default({ html: true });
|
|
17
17
|
/**
|
|
18
18
|
* Normalize link text to a safe file name or slug.
|
|
19
19
|
* For now, this is minimal: trim and replace spaces with dashes.
|
|
20
20
|
*/
|
|
21
21
|
function normalizeLinkText(text) {
|
|
22
|
-
return text.trim().replace(/\s+/g, "
|
|
22
|
+
return text.trim().replace(/\s+/g, "").toLowerCase();
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Replace [[link]] occurrences with a placeholder anchor and collect links.
|
|
@@ -28,9 +28,10 @@ function transformWikilinks(input, route, links) {
|
|
|
28
28
|
// Use a replacer so we can capture multiple occurrences
|
|
29
29
|
return input.replace(/\[\[([^\]]+)\]\]/g, (_, inner) => {
|
|
30
30
|
const display = inner.trim();
|
|
31
|
-
const href =
|
|
31
|
+
const href = `/${normalizeLinkText(display)}`;
|
|
32
32
|
links.add(display);
|
|
33
33
|
// Return markdown inline HTML anchor; markdown-it will preserve it
|
|
34
|
+
//for ease of use, this will return a stripped down version of the url
|
|
34
35
|
return `<a href="${href}" target="_blank" rel="noopener noreferrer">${display}</a>`;
|
|
35
36
|
});
|
|
36
37
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;AAuCH,sCAKC;AA1CD,8DAAqC;AAOrC,MAAM,EAAE,GAAG,IAAI,qBAAU,CAAC,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;AAExC;;;GAGG;AACH,SAAS,iBAAiB,CAAC,IAAY;IACrC,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAEvD,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB,CAAC,KAAa,EAAE,KAAa,EAAE,KAAkB;IAC1E,wDAAwD;IACxD,OAAO,KAAK,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC,EAAE,KAAa,EAAE,EAAE;QAC7D,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAC7B,MAAM,IAAI,GAAG,IAAI,iBAAiB,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9C,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACnB,mEAAmE;QACnE,sEAAsE;QACtE,OAAO,YAAY,IAAI,+CAA+C,OAAO,MAAM,CAAC;IACtF,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,SAAgB,aAAa,CAAC,QAAgB,EAAE,KAAa;IAC3D,MAAM,SAAS,GAAgB,IAAI,GAAG,EAAE,CAAC;IACzC,MAAM,WAAW,GAAG,kBAAkB,CAAC,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IACnE,MAAM,IAAI,GAAG,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACpC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAC7B,CAAC"}
|
package/package.json
CHANGED
package/src/example.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import path from "path";
|
|
3
|
-
import { parseMarkdown } from "./index";
|
|
4
|
-
|
|
5
|
-
const input = process.argv[2] || path.join(process.cwd(), "example.md");
|
|
6
|
-
if (!fs.existsSync(input)) {
|
|
7
|
-
console.error("No input file found:", input);
|
|
8
|
-
process.exit(1);
|
|
9
|
-
}
|
|
10
|
-
const content = fs.readFileSync(input, "utf8");
|
|
11
|
-
const result = parseMarkdown(content, "www.personalwebsite.com/test/");
|
|
12
|
-
console.log("HTML output:\n", result.html);
|
|
13
|
-
console.log("\nLinks found:", result.links_set);
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import { parseMarkdown } from "./index";
|
|
4
|
+
|
|
5
|
+
const input = process.argv[2] || path.join(process.cwd(), "example.md");
|
|
6
|
+
if (!fs.existsSync(input)) {
|
|
7
|
+
console.error("No input file found:", input);
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
const content = fs.readFileSync(input, "utf8");
|
|
11
|
+
const result = parseMarkdown(content, "www.personalwebsite.com/test/");
|
|
12
|
+
console.log("HTML output:\n", result.html);
|
|
13
|
+
console.log("\nLinks found:", result.links_set);
|
|
14
|
+
|
|
15
|
+
console.log("json parsed", JSON.stringify(result.html))
|
package/src/index.ts
CHANGED
|
@@ -1,51 +1,52 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* parseMarkdown
|
|
3
|
-
* - Accepts an Obsidian-style markdown string.
|
|
4
|
-
* - Finds all [[wikilinks]] and collects them into links[].
|
|
5
|
-
* - Replaces [[Name]] with an <a href="Name.html">Name</a> (simple default transform).
|
|
6
|
-
* - Returns the HTML (via markdown-it) and the array of links found.
|
|
7
|
-
* - This is a one way operation meant to just translate markdown files for the web
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import MarkdownIt from "markdown-it";
|
|
11
|
-
|
|
12
|
-
export type ParseResult = {
|
|
13
|
-
html: string;
|
|
14
|
-
links_set: Set<string>;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const md = new MarkdownIt();
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Normalize link text to a safe file name or slug.
|
|
21
|
-
* For now, this is minimal: trim and replace spaces with dashes.
|
|
22
|
-
*/
|
|
23
|
-
function normalizeLinkText(text: string): string {
|
|
24
|
-
return text.trim().replace(/\s+/g, "
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Replace [[link]] occurrences with a placeholder anchor and collect links.
|
|
30
|
-
*/
|
|
31
|
-
function transformWikilinks(input: string, route: string, links: Set<string>): string {
|
|
32
|
-
// Use a replacer so we can capture multiple occurrences
|
|
33
|
-
return input.replace(/\[\[([^\]]+)\]\]/g, (_, inner: string) => {
|
|
34
|
-
const display = inner.trim();
|
|
35
|
-
const href =
|
|
36
|
-
links.add(display);
|
|
37
|
-
// Return markdown inline HTML anchor; markdown-it will preserve it
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
*
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
|
|
1
|
+
/**
|
|
2
|
+
* parseMarkdown
|
|
3
|
+
* - Accepts an Obsidian-style markdown string.
|
|
4
|
+
* - Finds all [[wikilinks]] and collects them into links[].
|
|
5
|
+
* - Replaces [[Name]] with an <a href="Name.html">Name</a> (simple default transform).
|
|
6
|
+
* - Returns the HTML (via markdown-it) and the array of links found.
|
|
7
|
+
* - This is a one way operation meant to just translate markdown files for the web
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import MarkdownIt from "markdown-it";
|
|
11
|
+
|
|
12
|
+
export type ParseResult = {
|
|
13
|
+
html: string;
|
|
14
|
+
links_set: Set<string>;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const md = new MarkdownIt({html: true});
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Normalize link text to a safe file name or slug.
|
|
21
|
+
* For now, this is minimal: trim and replace spaces with dashes.
|
|
22
|
+
*/
|
|
23
|
+
function normalizeLinkText(text: string): string {
|
|
24
|
+
return text.trim().replace(/\s+/g, "").toLowerCase();
|
|
25
|
+
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Replace [[link]] occurrences with a placeholder anchor and collect links.
|
|
30
|
+
*/
|
|
31
|
+
function transformWikilinks(input: string, route: string, links: Set<string>): string {
|
|
32
|
+
// Use a replacer so we can capture multiple occurrences
|
|
33
|
+
return input.replace(/\[\[([^\]]+)\]\]/g, (_, inner: string) => {
|
|
34
|
+
const display = inner.trim();
|
|
35
|
+
const href = `/${normalizeLinkText(display)}`;
|
|
36
|
+
links.add(display);
|
|
37
|
+
// Return markdown inline HTML anchor; markdown-it will preserve it
|
|
38
|
+
//for ease of use, this will return a stripped down version of the url
|
|
39
|
+
return `<a href="${href}" target="_blank" rel="noopener noreferrer">${display}</a>`;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Main exported function.
|
|
45
|
+
* route should be setup in a way for you to handle params easily
|
|
46
|
+
*/
|
|
47
|
+
export function parseMarkdown(markdown: string, route: string): ParseResult {
|
|
48
|
+
const links_set: Set<string> = new Set();
|
|
49
|
+
const withAnchors = transformWikilinks(markdown, route, links_set);
|
|
50
|
+
const html = md.render(withAnchors);
|
|
51
|
+
return { html, links_set };
|
|
51
52
|
}
|
package/test/parser.spec.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { parseMarkdown } from "../src/index";
|
|
3
|
-
|
|
4
|
-
let pageTest: Set<string> = new Set<string>();
|
|
5
|
-
let linkTest: Set<string> = new Set<string>();
|
|
6
|
-
describe("parseMarkdown", () => {
|
|
7
|
-
it("converts [[wikilink]] to an anchor and collects link", () => {
|
|
8
|
-
const input = "This references [[My Page]] and also inline **bold** text.";
|
|
9
|
-
const { html, links_set } = parseMarkdown(input, "test/");
|
|
10
|
-
pageTest.add("My Page")
|
|
11
|
-
|
|
12
|
-
expect(links_set).toEqual(pageTest);
|
|
13
|
-
expect(html).toContain('
|
|
14
|
-
expect(html).toContain("<strong>bold</strong>");
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it("handles multiple wikilinks", () => {
|
|
18
|
-
const input = "[[One]] and [[Two]] and again [[One]]";
|
|
19
|
-
const { links_set } = parseMarkdown(input, "test/");
|
|
20
|
-
linkTest.add("One")
|
|
21
|
-
linkTest.add("Two")
|
|
22
|
-
expect(links_set).toEqual(linkTest);
|
|
23
|
-
});
|
|
24
|
-
});
|
|
1
|
+
import { describe, it, expect } from "vitest";
|
|
2
|
+
import { parseMarkdown } from "../src/index";
|
|
3
|
+
|
|
4
|
+
let pageTest: Set<string> = new Set<string>();
|
|
5
|
+
let linkTest: Set<string> = new Set<string>();
|
|
6
|
+
describe("parseMarkdown", () => {
|
|
7
|
+
it("converts [[wikilink]] to an anchor and collects link", () => {
|
|
8
|
+
const input = "This references [[My Page]] and also inline **bold** text.";
|
|
9
|
+
const { html, links_set } = parseMarkdown(input, "test/");
|
|
10
|
+
pageTest.add("My Page")
|
|
11
|
+
|
|
12
|
+
expect(links_set).toEqual(pageTest);
|
|
13
|
+
expect(html).toContain('<p>This references <a href="/mypage" target="_blank" rel="noopener noreferrer">My Page</a> and also inline <strong>bold</strong> text.</p>');
|
|
14
|
+
expect(html).toContain("<strong>bold</strong>");
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it("handles multiple wikilinks", () => {
|
|
18
|
+
const input = "[[One]] and [[Two]] and again [[One]]";
|
|
19
|
+
const { links_set } = parseMarkdown(input, "test/");
|
|
20
|
+
linkTest.add("One")
|
|
21
|
+
linkTest.add("Two")
|
|
22
|
+
expect(links_set).toEqual(linkTest);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
25
|
// more robust tests are needed
|
package/tsconfig.build.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"declaration": true,
|
|
5
|
-
"outDir": "dist",
|
|
6
|
-
"composite": false
|
|
7
|
-
},
|
|
8
|
-
"include": ["src/**/*"]
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"outDir": "dist",
|
|
6
|
+
"composite": false
|
|
7
|
+
},
|
|
8
|
+
"include": ["src/**/*"]
|
|
9
9
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"module": "CommonJS",
|
|
5
|
-
"outDir": "./dist",
|
|
6
|
-
"rootDir": "./src",
|
|
7
|
-
"moduleResolution": "Node",
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
"strict": true,
|
|
11
|
-
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"sourceMap": true,
|
|
13
|
-
"baseUrl": ".",
|
|
14
|
-
"resolveJsonModule": true
|
|
15
|
-
},
|
|
16
|
-
"include": ["src/index.ts"],
|
|
17
|
-
"exclude": ["node_modules", "dist","test"]
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "CommonJS",
|
|
5
|
+
"outDir": "./dist",
|
|
6
|
+
"rootDir": "./src",
|
|
7
|
+
"moduleResolution": "Node",
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"strict": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"sourceMap": true,
|
|
13
|
+
"baseUrl": ".",
|
|
14
|
+
"resolveJsonModule": true
|
|
15
|
+
},
|
|
16
|
+
"include": ["src/index.ts"],
|
|
17
|
+
"exclude": ["node_modules", "dist","test"]
|
|
18
18
|
}
|
package/build/Release/addon.exp
DELETED
|
Binary file
|
package/build/Release/addon.iobj
DELETED
|
Binary file
|
package/build/Release/addon.ipdb
DELETED
|
Binary file
|
package/build/Release/addon.lib
DELETED
|
Binary file
|
package/build/Release/addon.node
DELETED
|
Binary file
|
package/build/Release/addon.pdb
DELETED
|
Binary file
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<Project>
|
|
3
|
-
<ProjectOutputs>
|
|
4
|
-
<ProjectOutput>
|
|
5
|
-
<FullPath>C:\Users\ousoo\Desktop\personalProjects\Obsi-Parser\build\Release\addon.node</FullPath>
|
|
6
|
-
</ProjectOutput>
|
|
7
|
-
</ProjectOutputs>
|
|
8
|
-
<ContentFiles />
|
|
9
|
-
<SatelliteDlls />
|
|
10
|
-
<NonRecipeFileRefs />
|
|
11
|
-
</Project>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
C:\Users\ousoo\Desktop\personalProjects\Obsi-Parser\src\addon.c;C:\Users\ousoo\Desktop\personalProjects\Obsi-Parser\build\Release\obj\addon\src\addon.obj
|
|
2
|
-
C:\Users\ousoo\Desktop\personalProjects\Obsi-Parser\node_modules\node-gyp\src\win_delay_load_hook.cc;C:\Users\ousoo\Desktop\personalProjects\Obsi-Parser\build\Release\obj\addon\win_delay_load_hook.obj
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
^C:\USERS\OUSOO\DESKTOP\PERSONALPROJECTS\OBSI-PARSER\BUILD\RELEASE\OBJ\ADDON\SRC\ADDON.OBJ|C:\USERS\OUSOO\DESKTOP\PERSONALPROJECTS\OBSI-PARSER\BUILD\RELEASE\OBJ\ADDON\WIN_DELAY_LOAD_HOOK.OBJ
|
|
2
|
-
C:\Users\ousoo\Desktop\personalProjects\Obsi-Parser\build\Release\addon.LIB
|
|
3
|
-
C:\Users\ousoo\Desktop\personalProjects\Obsi-Parser\build\Release\addon.EXP
|
|
4
|
-
C:\Users\ousoo\Desktop\personalProjects\Obsi-Parser\build\Release\addon.IPDB
|
|
5
|
-
C:\Users\ousoo\Desktop\personalProjects\Obsi-Parser\build\Release\addon.IOBJ
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/build/addon.vcxproj
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
-
<ItemGroup Label="ProjectConfigurations">
|
|
4
|
-
<ProjectConfiguration Include="Debug|x64">
|
|
5
|
-
<Configuration>Debug</Configuration>
|
|
6
|
-
<Platform>x64</Platform>
|
|
7
|
-
</ProjectConfiguration>
|
|
8
|
-
<ProjectConfiguration Include="Release|x64">
|
|
9
|
-
<Configuration>Release</Configuration>
|
|
10
|
-
<Platform>x64</Platform>
|
|
11
|
-
</ProjectConfiguration>
|
|
12
|
-
</ItemGroup>
|
|
13
|
-
<PropertyGroup Label="Globals">
|
|
14
|
-
<ProjectGuid>{169C297E-80DA-2C56-C6FE-BC6EC4152522}</ProjectGuid>
|
|
15
|
-
<Keyword>Win32Proj</Keyword>
|
|
16
|
-
<RootNamespace>addon</RootNamespace>
|
|
17
|
-
<IgnoreWarnCompileDuplicatedFilename>true</IgnoreWarnCompileDuplicatedFilename>
|
|
18
|
-
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
|
19
|
-
<WindowsTargetPlatformVersion>10.0.26100.0</WindowsTargetPlatformVersion>
|
|
20
|
-
</PropertyGroup>
|
|
21
|
-
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
|
22
|
-
<PropertyGroup Label="Configuration">
|
|
23
|
-
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
24
|
-
</PropertyGroup>
|
|
25
|
-
<PropertyGroup Label="Locals">
|
|
26
|
-
<PlatformToolset>v143</PlatformToolset>
|
|
27
|
-
</PropertyGroup>
|
|
28
|
-
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
|
29
|
-
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props"/>
|
|
30
|
-
<ImportGroup Label="ExtensionSettings"/>
|
|
31
|
-
<ImportGroup Label="PropertySheets">
|
|
32
|
-
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
|
33
|
-
</ImportGroup>
|
|
34
|
-
<PropertyGroup Label="UserMacros"/>
|
|
35
|
-
<PropertyGroup>
|
|
36
|
-
<ExecutablePath>$(ExecutablePath);$(MSBuildProjectDirectory)\..\bin\;$(MSBuildProjectDirectory)\..\bin\</ExecutablePath>
|
|
37
|
-
<IgnoreImportLibrary>true</IgnoreImportLibrary>
|
|
38
|
-
<IntDir>$(Configuration)\obj\$(ProjectName)\</IntDir>
|
|
39
|
-
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
|
40
|
-
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
|
41
|
-
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
|
42
|
-
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.node</TargetExt>
|
|
43
|
-
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.node</TargetExt>
|
|
44
|
-
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.node</TargetExt>
|
|
45
|
-
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.node</TargetExt>
|
|
46
|
-
<TargetName>$(ProjectName)</TargetName>
|
|
47
|
-
<TargetPath>$(OutDir)\$(ProjectName).node</TargetPath>
|
|
48
|
-
</PropertyGroup>
|
|
49
|
-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
50
|
-
<ClCompile>
|
|
51
|
-
<AdditionalIncludeDirectories>C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\include\node;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\src;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\openssl\config;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\openssl\openssl\include;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\uv\include;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\zlib;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\v8\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
52
|
-
<AdditionalOptions>/Zc:__cplusplus -std:c++20 /Zm2000 %(AdditionalOptions)</AdditionalOptions>
|
|
53
|
-
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
|
54
|
-
<BufferSecurityCheck>true</BufferSecurityCheck>
|
|
55
|
-
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
|
56
|
-
<DisableSpecificWarnings>4351;4355;4800;4251;4275;4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
|
57
|
-
<ExceptionHandling>false</ExceptionHandling>
|
|
58
|
-
<MinimalRebuild>false</MinimalRebuild>
|
|
59
|
-
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
|
60
|
-
<OmitFramePointers>false</OmitFramePointers>
|
|
61
|
-
<Optimization>Disabled</Optimization>
|
|
62
|
-
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
|
63
|
-
<PreprocessorDefinitions>NODE_GYP_MODULE_NAME=addon;USING_UV_SHARED=1;USING_V8_SHARED=1;V8_DEPRECATION_WARNINGS=1;_GLIBCXX_USE_CXX11_ABI=1;_FILE_OFFSET_BITS=64;WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_HAS_EXCEPTIONS=0;NOMINMAX;OPENSSL_NO_PINSHARED;OPENSSL_THREADS;BUILDING_NODE_EXTENSION;HOST_BINARY="node.exe";DEBUG;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
64
|
-
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
|
65
|
-
<StringPooling>true</StringPooling>
|
|
66
|
-
<SuppressStartupBanner>true</SuppressStartupBanner>
|
|
67
|
-
<TreatWarningAsError>false</TreatWarningAsError>
|
|
68
|
-
<WarningLevel>Level3</WarningLevel>
|
|
69
|
-
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
70
|
-
</ClCompile>
|
|
71
|
-
<Lib>
|
|
72
|
-
<AdditionalOptions>/LTCG:INCREMENTAL %(AdditionalOptions)</AdditionalOptions>
|
|
73
|
-
</Lib>
|
|
74
|
-
<Link>
|
|
75
|
-
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;delayimp.lib;"C:\\Users\\ousoo\\AppData\\Local\\node-gyp\\Cache\\22.20.0\\x64\\node.lib"</AdditionalDependencies>
|
|
76
|
-
<AdditionalOptions>/LTCG:INCREMENTAL /ignore:4199 %(AdditionalOptions)</AdditionalOptions>
|
|
77
|
-
<DelayLoadDLLs>node.exe;%(DelayLoadDLLs)</DelayLoadDLLs>
|
|
78
|
-
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
79
|
-
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
80
|
-
<OptimizeReferences>true</OptimizeReferences>
|
|
81
|
-
<OutputFile>$(OutDir)$(ProjectName).node</OutputFile>
|
|
82
|
-
<SuppressStartupBanner>true</SuppressStartupBanner>
|
|
83
|
-
<TargetExt>.node</TargetExt>
|
|
84
|
-
<TargetMachine>MachineX64</TargetMachine>
|
|
85
|
-
</Link>
|
|
86
|
-
<ResourceCompile>
|
|
87
|
-
<AdditionalIncludeDirectories>C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\include\node;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\src;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\openssl\config;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\openssl\openssl\include;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\uv\include;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\zlib;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\v8\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
88
|
-
<PreprocessorDefinitions>NODE_GYP_MODULE_NAME=addon;USING_UV_SHARED=1;USING_V8_SHARED=1;V8_DEPRECATION_WARNINGS=1;_GLIBCXX_USE_CXX11_ABI=1;_FILE_OFFSET_BITS=64;WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_HAS_EXCEPTIONS=0;NOMINMAX;OPENSSL_NO_PINSHARED;OPENSSL_THREADS;BUILDING_NODE_EXTENSION;HOST_BINARY="node.exe";DEBUG;_DEBUG;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
89
|
-
</ResourceCompile>
|
|
90
|
-
</ItemDefinitionGroup>
|
|
91
|
-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
92
|
-
<ClCompile>
|
|
93
|
-
<AdditionalIncludeDirectories>C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\include\node;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\src;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\openssl\config;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\openssl\openssl\include;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\uv\include;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\zlib;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\v8\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
94
|
-
<AdditionalOptions>/Zc:__cplusplus -std:c++20 /Zm2000 %(AdditionalOptions)</AdditionalOptions>
|
|
95
|
-
<BufferSecurityCheck>true</BufferSecurityCheck>
|
|
96
|
-
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
|
97
|
-
<DisableSpecificWarnings>4351;4355;4800;4251;4275;4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
|
98
|
-
<ExceptionHandling>false</ExceptionHandling>
|
|
99
|
-
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
|
100
|
-
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
101
|
-
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
|
102
|
-
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
103
|
-
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
|
104
|
-
<OmitFramePointers>true</OmitFramePointers>
|
|
105
|
-
<Optimization>Full</Optimization>
|
|
106
|
-
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
|
107
|
-
<PreprocessorDefinitions>NODE_GYP_MODULE_NAME=addon;USING_UV_SHARED=1;USING_V8_SHARED=1;V8_DEPRECATION_WARNINGS=1;_GLIBCXX_USE_CXX11_ABI=1;_FILE_OFFSET_BITS=64;WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_HAS_EXCEPTIONS=0;NOMINMAX;OPENSSL_NO_PINSHARED;OPENSSL_THREADS;BUILDING_NODE_EXTENSION;HOST_BINARY="node.exe";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
108
|
-
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
|
109
|
-
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
|
110
|
-
<StringPooling>true</StringPooling>
|
|
111
|
-
<SuppressStartupBanner>true</SuppressStartupBanner>
|
|
112
|
-
<TreatWarningAsError>false</TreatWarningAsError>
|
|
113
|
-
<WarningLevel>Level3</WarningLevel>
|
|
114
|
-
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
115
|
-
</ClCompile>
|
|
116
|
-
<Lib>
|
|
117
|
-
<AdditionalOptions>/LTCG:INCREMENTAL %(AdditionalOptions)</AdditionalOptions>
|
|
118
|
-
</Lib>
|
|
119
|
-
<Link>
|
|
120
|
-
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;delayimp.lib;"C:\\Users\\ousoo\\AppData\\Local\\node-gyp\\Cache\\22.20.0\\x64\\node.lib"</AdditionalDependencies>
|
|
121
|
-
<AdditionalOptions>/LTCG:INCREMENTAL /ignore:4199 %(AdditionalOptions)</AdditionalOptions>
|
|
122
|
-
<DelayLoadDLLs>node.exe;%(DelayLoadDLLs)</DelayLoadDLLs>
|
|
123
|
-
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
124
|
-
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
125
|
-
<OptimizeReferences>true</OptimizeReferences>
|
|
126
|
-
<OutputFile>$(OutDir)$(ProjectName).node</OutputFile>
|
|
127
|
-
<SuppressStartupBanner>true</SuppressStartupBanner>
|
|
128
|
-
<TargetExt>.node</TargetExt>
|
|
129
|
-
<TargetMachine>MachineX64</TargetMachine>
|
|
130
|
-
</Link>
|
|
131
|
-
<ResourceCompile>
|
|
132
|
-
<AdditionalIncludeDirectories>C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\include\node;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\src;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\openssl\config;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\openssl\openssl\include;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\uv\include;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\zlib;C:\Users\ousoo\AppData\Local\node-gyp\Cache\22.20.0\deps\v8\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
133
|
-
<PreprocessorDefinitions>NODE_GYP_MODULE_NAME=addon;USING_UV_SHARED=1;USING_V8_SHARED=1;V8_DEPRECATION_WARNINGS=1;_GLIBCXX_USE_CXX11_ABI=1;_FILE_OFFSET_BITS=64;WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_HAS_EXCEPTIONS=0;NOMINMAX;OPENSSL_NO_PINSHARED;OPENSSL_THREADS;BUILDING_NODE_EXTENSION;HOST_BINARY="node.exe";%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
134
|
-
</ResourceCompile>
|
|
135
|
-
</ItemDefinitionGroup>
|
|
136
|
-
<ItemGroup>
|
|
137
|
-
<None Include="..\binding.gyp"/>
|
|
138
|
-
</ItemGroup>
|
|
139
|
-
<ItemGroup>
|
|
140
|
-
<ClCompile Include="..\src\addon.c">
|
|
141
|
-
<ObjectFileName>$(IntDir)\src\addon.obj</ObjectFileName>
|
|
142
|
-
</ClCompile>
|
|
143
|
-
<ClCompile Include="C:\Users\ousoo\Desktop\personalProjects\Obsi-Parser\node_modules\node-gyp\src\win_delay_load_hook.cc"/>
|
|
144
|
-
</ItemGroup>
|
|
145
|
-
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
|
146
|
-
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets"/>
|
|
147
|
-
<ImportGroup Label="ExtensionTargets"/>
|
|
148
|
-
</Project>
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
-
<ItemGroup>
|
|
4
|
-
<Filter Include="..">
|
|
5
|
-
<UniqueIdentifier>{739DB09A-CC57-A953-A6CF-F64FA08E4FA7}</UniqueIdentifier>
|
|
6
|
-
</Filter>
|
|
7
|
-
<Filter Include="..\src">
|
|
8
|
-
<UniqueIdentifier>{8CDEE807-BC53-E450-C8B8-4DEBB66742D4}</UniqueIdentifier>
|
|
9
|
-
</Filter>
|
|
10
|
-
<Filter Include="C:">
|
|
11
|
-
<UniqueIdentifier>{7B735499-E5DD-1C2B-6C26-70023832A1CF}</UniqueIdentifier>
|
|
12
|
-
</Filter>
|
|
13
|
-
<Filter Include="C:\Users">
|
|
14
|
-
<UniqueIdentifier>{E9F714C1-DA89-54E2-60CF-39FEB20BF756}</UniqueIdentifier>
|
|
15
|
-
</Filter>
|
|
16
|
-
<Filter Include="C:\Users\ousoo">
|
|
17
|
-
<UniqueIdentifier>{BD0AFDDD-FFDA-2EF4-3616-3CE6B8C29230}</UniqueIdentifier>
|
|
18
|
-
</Filter>
|
|
19
|
-
<Filter Include="C:\Users\ousoo\Desktop">
|
|
20
|
-
<UniqueIdentifier>{B23D6E4D-7634-EF57-62FC-46A6189C0B6E}</UniqueIdentifier>
|
|
21
|
-
</Filter>
|
|
22
|
-
<Filter Include="C:\Users\ousoo\Desktop\personalProjects">
|
|
23
|
-
<UniqueIdentifier>{3FE31B32-61D7-60DD-3D12-8276333F2D94}</UniqueIdentifier>
|
|
24
|
-
</Filter>
|
|
25
|
-
<Filter Include="C:\Users\ousoo\Desktop\personalProjects\Obsi-Parser">
|
|
26
|
-
<UniqueIdentifier>{3986AA5F-6C76-AA49-412E-818DCD9809A1}</UniqueIdentifier>
|
|
27
|
-
</Filter>
|
|
28
|
-
<Filter Include="C:\Users\ousoo\Desktop\personalProjects\Obsi-Parser\node_modules">
|
|
29
|
-
<UniqueIdentifier>{56DF7A98-063D-FB9D-485C-089023B4C16A}</UniqueIdentifier>
|
|
30
|
-
</Filter>
|
|
31
|
-
<Filter Include="C:\Users\ousoo\Desktop\personalProjects\Obsi-Parser\node_modules\node-gyp">
|
|
32
|
-
<UniqueIdentifier>{77348C0E-2034-7791-74D5-63C077DF5A3B}</UniqueIdentifier>
|
|
33
|
-
</Filter>
|
|
34
|
-
<Filter Include="C:\Users\ousoo\Desktop\personalProjects\Obsi-Parser\node_modules\node-gyp\src">
|
|
35
|
-
<UniqueIdentifier>{8CDEE807-BC53-E450-C8B8-4DEBB66742D4}</UniqueIdentifier>
|
|
36
|
-
</Filter>
|
|
37
|
-
<Filter Include="..">
|
|
38
|
-
<UniqueIdentifier>{739DB09A-CC57-A953-A6CF-F64FA08E4FA7}</UniqueIdentifier>
|
|
39
|
-
</Filter>
|
|
40
|
-
</ItemGroup>
|
|
41
|
-
<ItemGroup>
|
|
42
|
-
<ClCompile Include="..\src\addon.c">
|
|
43
|
-
<Filter>..\src</Filter>
|
|
44
|
-
</ClCompile>
|
|
45
|
-
<ClCompile Include="C:\Users\ousoo\Desktop\personalProjects\Obsi-Parser\node_modules\node-gyp\src\win_delay_load_hook.cc">
|
|
46
|
-
<Filter>C:\Users\ousoo\Desktop\personalProjects\Obsi-Parser\node_modules\node-gyp\src</Filter>
|
|
47
|
-
</ClCompile>
|
|
48
|
-
<None Include="..\binding.gyp">
|
|
49
|
-
<Filter>..</Filter>
|
|
50
|
-
</None>
|
|
51
|
-
</ItemGroup>
|
|
52
|
-
</Project>
|
package/build/binding.sln
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
2
|
-
# Visual Studio 2015
|
|
3
|
-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "addon", "addon.vcxproj", "{169C297E-80DA-2C56-C6FE-BC6EC4152522}"
|
|
4
|
-
EndProject
|
|
5
|
-
Global
|
|
6
|
-
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
7
|
-
Debug|x64 = Debug|x64
|
|
8
|
-
Release|x64 = Release|x64
|
|
9
|
-
EndGlobalSection
|
|
10
|
-
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
11
|
-
{169C297E-80DA-2C56-C6FE-BC6EC4152522}.Debug|x64.ActiveCfg = Debug|x64
|
|
12
|
-
{169C297E-80DA-2C56-C6FE-BC6EC4152522}.Debug|x64.Build.0 = Debug|x64
|
|
13
|
-
{169C297E-80DA-2C56-C6FE-BC6EC4152522}.Release|x64.ActiveCfg = Release|x64
|
|
14
|
-
{169C297E-80DA-2C56-C6FE-BC6EC4152522}.Release|x64.Build.0 = Release|x64
|
|
15
|
-
EndGlobalSection
|
|
16
|
-
GlobalSection(SolutionProperties) = preSolution
|
|
17
|
-
HideSolutionNode = FALSE
|
|
18
|
-
EndGlobalSection
|
|
19
|
-
EndGlobal
|
package/test.html
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<a href="https://www.personalwebsite.com/test/C-Book" target="_blank" rel="noopener noreferrer">C Book</a>
|