MCPcopy Index your code
hub / github.com/simstudioai/sim / headingPrefix

Function headingPrefix

apps/sim/connectors/google-docs/google-docs.ts:58–75  ·  view source on GitHub ↗

* Maps a Google Docs heading style to a Markdown heading prefix.

(namedStyleType?: string)

Source from the content-addressed store, hash-verified

56 * Maps a Google Docs heading style to a Markdown heading prefix.
57 */
58function headingPrefix(namedStyleType?: string): string {
59 switch (namedStyleType) {
60 case 'HEADING_1':
61 return '# '
62 case 'HEADING_2':
63 return '## '
64 case 'HEADING_3':
65 return '### '
66 case 'HEADING_4':
67 return '#### '
68 case 'HEADING_5':
69 return '##### '
70 case 'HEADING_6':
71 return '###### '
72 default:
73 return ''
74 }
75}
76
77/**
78 * Extracts plain text from a Google Docs API structured document response.

Callers 1

extractTextFromDocsBodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected