Skip to content

MarkdownParser

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/libs/parser-core/src/parsers/config-docs/markdown.parser.ts

Markdown Parser implementation

Implements: IParser

Methods

MethodSignatureReturns
initializeinitialize(_config: ParserConfig)Promise<void>
canParsecanParse(filePath: string)boolean
parseFileparseFile(filePath: string, content: string)Promise<ParseResult>
parseFilesparseFiles(files: ParseFileInput[])Promise<ParseResult[]>
destroydestroy()Promise<void>

Properties

PropertyType
nameany
versionany
supportedPatternsany

Where it refuses work

  • MarkdownParser stops the work with an early return when typeMap[baseName].
  • MarkdownParser stops the work with an early return when /guide/i.test(fileName).
  • MarkdownParser stops the work with an early return when /tutorial/i.test(fileName).
  • MarkdownParser stops the work with an early return when /api/i.test(fileName).
  • MarkdownParser stops the work with an early return when /docs?/i.test(filePath).
  • MarkdownParser stops the work with an early return when /component/i.test(fileName).

When something fails

  • MarkdownParser handles failure in 2 places: it logs it and continues in 1, and turns it into a return value in 1.

Was this page helpful?

Download as PDF