feat(coding-agent): added HTML content extraction with Readability and GFM markdown support
- Added `extractReadableFromHtml()` utility function with dual-path content extraction using Readability library and CSS selector fallback. - Integrated Turndown library with GitHub Flavored Markdown plugin for improved HTML-to-markdown conversion supporting tables, strikethrough, and task lists. - Refactored `getPageReadable()` action to use new extraction function, consolidating content parsing logic and improving maintainability. - Added TypeScript type declarations for turndown-plugin-gfm module with custom Turndown rules for enhanced markdown formatting.
This commit is contained in:
Vendored
+9
@@ -12,3 +12,12 @@ declare module "*.py" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
// turndown-plugin-gfm has no published types
|
||||
declare module "turndown-plugin-gfm" {
|
||||
import type TurndownService from "turndown";
|
||||
export const gfm: TurndownService.Plugin;
|
||||
export const tables: TurndownService.Plugin;
|
||||
export const strikethrough: TurndownService.Plugin;
|
||||
export const taskListItems: TurndownService.Plugin;
|
||||
}
|
||||
Reference in New Issue
Block a user