extract-webpage 1.2.56 → 1.2.58
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "extract-webpage",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.58",
|
|
4
4
|
"module": "./dist/extract-webpage.es.js",
|
|
5
5
|
"description": "Search, extract, cite, and outline the web for a topic with AI Research Agent.",
|
|
6
6
|
"author": "vtempest <grokthiscontact@gmail.com>",
|
|
@@ -72,19 +72,20 @@
|
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@huggingface/transformers": "^3.8.1",
|
|
74
74
|
"ai": "^5.0.0",
|
|
75
|
-
"chat-agent-toolkit": "^1.2.
|
|
75
|
+
"chat-agent-toolkit": "^1.2.57",
|
|
76
76
|
"chrono-node": "^2.9.0",
|
|
77
77
|
"drizzle-orm": "^0.45.1",
|
|
78
|
-
"extract-pdf": "^0.1.
|
|
79
|
-
"extract-youtube": "^1.0.
|
|
80
|
-
"prismjs": "^1.30.0",
|
|
78
|
+
"extract-pdf": "^0.1.45",
|
|
79
|
+
"extract-youtube": "^1.0.44",
|
|
81
80
|
"html-entities": "^2.6.0",
|
|
82
81
|
"js-yaml": "^4.1.1",
|
|
83
82
|
"jsdom": "^28.1.0",
|
|
84
83
|
"jszip": "^3.10.1",
|
|
85
84
|
"linkedom": "^0.18.12",
|
|
86
85
|
"marked": "^17.0.4",
|
|
86
|
+
"marked-highlight": "^2.2.4",
|
|
87
87
|
"node-fetch": "^3.3.2",
|
|
88
|
+
"prismjs": "^1.30.0",
|
|
88
89
|
"qwksearch-api-client": "^0.0.12",
|
|
89
90
|
"zod": "^4.3.6"
|
|
90
91
|
},
|
|
@@ -139,7 +139,30 @@ export function convertURLToAbsoluteURL(base, relative) {
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
import { marked } from "marked";
|
|
142
|
-
import
|
|
142
|
+
import Prism from "prismjs";
|
|
143
|
+
import "prismjs/components/prism-markup";
|
|
144
|
+
import "prismjs/components/prism-css";
|
|
145
|
+
import "prismjs/components/prism-javascript";
|
|
146
|
+
import "prismjs/components/prism-typescript";
|
|
147
|
+
import "prismjs/components/prism-jsx";
|
|
148
|
+
import "prismjs/components/prism-tsx";
|
|
149
|
+
import "prismjs/components/prism-python";
|
|
150
|
+
import "prismjs/components/prism-bash";
|
|
151
|
+
import "prismjs/components/prism-json";
|
|
152
|
+
import "prismjs/components/prism-yaml";
|
|
153
|
+
import "prismjs/components/prism-markdown";
|
|
154
|
+
import "prismjs/components/prism-sql";
|
|
155
|
+
import "prismjs/components/prism-rust";
|
|
156
|
+
import "prismjs/components/prism-go";
|
|
157
|
+
import "prismjs/components/prism-java";
|
|
158
|
+
import "prismjs/components/prism-c";
|
|
159
|
+
import "prismjs/components/prism-cpp";
|
|
160
|
+
|
|
161
|
+
function highlightCode(code, lang) {
|
|
162
|
+
const language = Prism.languages[lang] ? lang : "plaintext";
|
|
163
|
+
if (language === "plaintext") return code;
|
|
164
|
+
return Prism.highlight(code, Prism.languages[language], language);
|
|
165
|
+
}
|
|
143
166
|
|
|
144
167
|
/**
|
|
145
168
|
* Converts Markdown text to HTML. It handles the following Markdown elements:
|