Skip to content

PromptScript API


Interface: SectionRenderer

Defined in: core/src/types/convention.ts:23

Section rendering configuration.

Properties

end?

optional end: string

Defined in: core/src/types/convention.ts:40

Template for section end (optional, for paired tags). Variables: {{name}}

Examples

XML: "</{{name}}>"
Markdown: "" (empty - no closing tag)

indent?

optional indent: string

Defined in: core/src/types/convention.ts:52

Indentation per level.

Default

'  ' (2 spaces)

nameTransform?

optional nameTransform: "kebab-case" | "camelCase" | "PascalCase" | "none"

Defined in: core/src/types/convention.ts:46

Whether to convert section names.

Default

'kebab-case'

start

start: string

Defined in: core/src/types/convention.ts:31

Template for section start. Variables: {{name}}, {{level}}, {{content}}

Examples

XML: "<{{name}}>"
Markdown: "{{#repeat level}}#{{/repeat}} {{name}}"