TypeStrong / typedoc

Documentation generator for TypeScript projects.
https://typedoc.org
Apache License 2.0
7.78k stars 704 forks source link

No file type validation for external documents? #2784

Open phoneticallySAARTHaK opened 4 hours ago

phoneticallySAARTHaK commented 4 hours ago

Search terms

external document file validation, markdown

Expected Behavior

The local file (extension) being loaded should be constrained, unless there are plans to include arbitrary files.

Actual Behavior

No validation of file extension: https://github.com/TypeStrong/typedoc/blob/beta/src/lib/converter/converter.ts#L609

It will resolve files with any extension, and try to parse it as markdown

phoneticallySAARTHaK commented 4 hours ago

Also, irrelevant to the issue, is it possible to override the parsed markdown?

Currently the PARSE event is triggered after the md is parsed, causing double computation/parsing of the text.

Should I make a separate issue for this?