extract-webpage 1.2.55 → 1.2.56

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.55",
3
+ "version": "1.2.56",
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,11 +72,11 @@
72
72
  "dependencies": {
73
73
  "@huggingface/transformers": "^3.8.1",
74
74
  "ai": "^5.0.0",
75
- "chat-agent-toolkit": "^1.2.54",
75
+ "chat-agent-toolkit": "^1.2.55",
76
76
  "chrono-node": "^2.9.0",
77
77
  "drizzle-orm": "^0.45.1",
78
- "extract-pdf": "^0.1.42",
79
- "extract-youtube": "^1.0.42",
78
+ "extract-pdf": "^0.1.43",
79
+ "extract-youtube": "^1.0.43",
80
80
  "prismjs": "^1.30.0",
81
81
  "html-entities": "^2.6.0",
82
82
  "js-yaml": "^4.1.1",
@@ -139,24 +139,7 @@ export function convertURLToAbsoluteURL(base, relative) {
139
139
  }
140
140
 
141
141
  import { marked } from "marked";
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";
142
+ import { highlightCode } from "chat-agent-toolkit";
160
143
 
161
144
  /**
162
145
  * Converts Markdown text to HTML. It handles the following Markdown elements:
@@ -189,9 +172,7 @@ export function convertMarkdownToHTML(content, toHtml = true) {
189
172
 
190
173
  marked.setOptions({
191
174
  highlight: function (code, lang) {
192
- const language = Prism.languages[lang] ? lang : "plaintext";
193
- if (language === "plaintext") return code;
194
- return Prism.highlight(code, Prism.languages[language], language);
175
+ return highlightCode(code, lang) ?? code;
195
176
  },
196
177
  langPrefix: "language-",
197
178
  });