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

Fix Markdown errors missing source filename #3514

Merged

Conversation

hippotastic
Copy link
Contributor

Changes

  • Adds a proper source filename to Markdown errors that fail the build.
  • Reason: Questions where users did not know which Markdown file was causing a build failure were asked multiple times in our Discord support channel in the last few days.
  • Old error message example:
    Expected a closing tag for `<br>` (2:74-2:78) before the end of `paragraph
    
  • New error message example:
    Failed to parse Markdown file "D:\Dev\astro-docs\src\pages\en\core-concepts\routing.md":
    Expected a closing tag for `<br>` (2:74-2:78) before the end of `paragraph
    
  • Works in build, dev, and SSR modes.

Testing

  • Ran all tests locally.
  • Performed multiple builds of the Astro Docs repo, inserting test errors in various MD files.

Docs

  • Not a visible change, just a bugfix.

@changeset-bot
Copy link

changeset-bot bot commented Jun 2, 2022

🦋 Changeset detected

Latest commit: ec0e6aa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/markdown-remark Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the feat: markdown Related to Markdown (scope) label Jun 2, 2022
Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the PR!

@natemoo-re natemoo-re merged commit 6c955ca into withastro:main Jun 3, 2022
@github-actions github-actions bot mentioned this pull request Jun 3, 2022
@hippotastic hippotastic deleted the fix/add-filename-to-md-errors branch June 3, 2022 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: markdown Related to Markdown (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants