TemplatesLanguageComponentFormatSource
The format half of a {{token:format}} placeholder.
- A
RegExpdescribes a scalar format — core’s own shape, e.g. theYYYY-MM-DDof{{date:YYYY-MM-DD}}— and is wrapped into astring-aliased token. - APrismTokenObjectdescribes a structured format, used verbatim, so a dialect whose format half is an object rather than a word can supply its owninsidegrammar and extentpattern. - A factory is the structured form for a dialect that must nest an already registered Prism language into thatinside— it receives the loaded Prism module, so the consumer never callsloadPrism.
Import:
import type { TemplatesLanguageComponentFormatSource } from 'obsidian-dev-utils/obsidian/components/templates-language-component';Signature:
export type TemplatesLanguageComponentFormatSourceSignature:
type TemplatesLanguageComponentFormatSource = | ((params: SyntaxHighlightingComponentGrammarFactoryParams) => PrismTokenObject) | PrismTokenObject | RegExpType: | ((params: SyntaxHighlightingComponentGrammarFactoryParams) => PrismTokenObject) | PrismTokenObject | RegExp
Links to this page: