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

Method processContentLine

src/tools/documentConverter.ts:900–915  ·  view source on GitHub ↗

* 处理单行内容

(
    line: string,
    maxWidth: number,
    fontSize: number
  )

Source from the content-addressed store, hash-verified

898 * 处理单行内容
899 */
900 private processContentLine(
901 line: string,
902 maxWidth: number,
903 fontSize: number
904 ): Array<{ text: string; isHeading: boolean }> {
905 const trimmedLine = line.trim();
906
907 if (!trimmedLine) {
908 return [{ text: '', isHeading: false }];
909 }
910
911 const isHeading = this.isMarkdownHeading(trimmedLine);
912 const text = this.removeMarkdownHeadingMarkers(trimmedLine, isHeading);
913
914 return this.wrapTextToLines(text, maxWidth, fontSize, isHeading);
915 }
916
917 /**
918 * 检查是否是Markdown标题

Callers 1

splitContentIntoLinesMethod · 0.95

Calls 3

isMarkdownHeadingMethod · 0.95
wrapTextToLinesMethod · 0.95

Tested by

no test coverage detected