Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include assets with .html file extensions are wrongly interpreted as markdown files. #72

Closed
jeffschwartz opened this issue Jun 29, 2019 · 0 comments
Assignees
Labels
bug Something isn't working generator related Issue is generator related metadata related Issue is metadata related
Milestone

Comments

@jeffschwartz
Copy link
Contributor

jeffschwartz commented Jun 29, 2019

In getAllIncludesMetadata metadata.matter.content is being resolved incorrectly. The file name's extension is queried from the function's path argument and then compared to "html", which is wrong; it should be compared to ".html".

metadata.matter.content = parse(path).ext === "html"

parse(path).ext will return a file extension including the dot so the above comparison fails. Adding a dot corrects the error:

metadata.matter.content = parse(path).ext === ".html"
@jeffschwartz jeffschwartz added bug Something isn't working metadata related Issue is metadata related labels Jun 29, 2019
@jeffschwartz jeffschwartz added this to the v1.0.0-rc.2 milestone Jun 29, 2019
@jeffschwartz jeffschwartz self-assigned this Jun 29, 2019
jeffschwartz added a commit that referenced this issue Jun 29, 2019
passed to marked and converted to markup
jeffschwartz added a commit that referenced this issue Jun 29, 2019
content to be parsed as markdown before being
assigned to metadata.matter.content
@jeffschwartz jeffschwartz changed the title Includes with .html file extension are wrongly interpreted as markdown files. Includes assets with .html file extension are wrongly interpreted as markdown files. Jun 29, 2019
@jeffschwartz jeffschwartz changed the title Includes assets with .html file extension are wrongly interpreted as markdown files. Include assets with .html file extensions are wrongly interpreted as markdown files. Jun 29, 2019
@jeffschwartz jeffschwartz added the generator related Issue is generator related label Jun 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working generator related Issue is generator related metadata related Issue is metadata related
Projects
None yet
Development

No branches or pull requests

1 participant