MCPcopy Create free account
hub / github.com/Tele-AI/doc-ops-mcp / processTextNodeToTextRun

Method processTextNodeToTextRun

src/tools/htmlConverter.ts:835–846  ·  view source on GitHub ↗

* 处理文本节点转换为TextRun

($: any, node: any, baseFontSize: number, baseFontFamily: string)

Source from the content-addressed store, hash-verified

833 * 处理文本节点转换为TextRun
834 */
835 private processTextNodeToTextRun($: any, node: any, baseFontSize: number, baseFontFamily: string): any {
836 const rawText = $(node).text();
837 const sanitizedText = this.sanitizeHtml(rawText);
838 if (sanitizedText.trim()) {
839 return new TextRun({
840 text: sanitizedText,
841 size: baseFontSize,
842 font: baseFontFamily,
843 });
844 }
845 return null;
846 }
847
848 /**
849 * 处理标签节点转换为TextRun

Callers 1

processNodeToTextRunMethod · 0.95

Calls 1

sanitizeHtmlMethod · 0.95

Tested by

no test coverage detected