Adjust isMarkdownFile heuristics to not Indirectly Depend Upon Language Extensions #220
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Per #219,
isMarkdownFile
relies on language support for MDX files to be installed in order to work. This change adds fallback logic to the method to support checking the supported file extensions (md, mdx) to support these file types without need for users to install MDX language support.Testing
To test the changes, I:
frontMatter.content.autoUpdateDate
was set totrue
Notes:
As discussed in the issue, there's an alternative path for resolving this: explicitly requiring mdx language support in the extension manifest. This might not be desirable-- since it's unknown (to me) how many people are using Front Matter for MDX instead of Markdown.