fix: add null checks to parsers and fix docs path
This commit is contained in:
@@ -8,6 +8,10 @@ const HR_REGEX = /^---+$/
|
||||
const REFERENCE_REGEX = /@see\s+([^\s]+)/g
|
||||
|
||||
export function parseMarkdown(content: string): ParsedDoc {
|
||||
if (!content || typeof content !== 'string') {
|
||||
return { title: '', metadata: {}, sections: [], references: [] };
|
||||
}
|
||||
|
||||
const lines = content.split('\n')
|
||||
const result: ParsedDoc = {
|
||||
title: '',
|
||||
|
||||
Reference in New Issue
Block a user