Skip to content

feat(languages): update markdown grammar version#14814

Closed
RoloEdits wants to merge 2 commits intohelix-editor:masterfrom
RoloEdits:markdown-grammar
Closed

feat(languages): update markdown grammar version#14814
RoloEdits wants to merge 2 commits intohelix-editor:masterfrom
RoloEdits:markdown-grammar

Conversation

@RoloEdits
Copy link
Copy Markdown
Contributor

Updates the markdown and markdown_inline grammar versions.

While updating I did come across a build issue:

Fetching 273 grammars
  271 up to date git grammars
  Failure 1/2: markdown_inline Git command failed.
  Stdout:
  Stderr: error: Your local changes to the following files would be overwritten by checkout:
        contrib/screenshot.png
  Please commit your changes or stash them before you switch branches.
  Aborting

  Failure 2/2: markdown Git command failed.
  Stdout:
  Stderr: error: Your local changes to the following files would be overwritten by checkout:
        contrib/screenshot.png
  Please commit your changes or stash them before you switch branches.
  Aborting

I fixed this by deleting the runtime/grammars/sources/markdown|markdown_inline folders. Unsure if this is just a local issue or if this will cause problems with everyone and should be handled more robustly.

Fixes: #9678

@RoloEdits
Copy link
Copy Markdown
Contributor Author

Seems like it is indeed an issue. Any thoughts on how to resolve @the-mikedavis ?

@RoloEdits RoloEdits force-pushed the markdown-grammar branch 2 times, most recently from f749b46 to d7572d8 Compare November 17, 2025 20:52
@RoloEdits
Copy link
Copy Markdown
Contributor Author

Well adding

git(&grammar_dir, ["reset", "--hard"])?;
git(&grammar_dir, ["clean", "-fdx"])?;

now only has the issue on the test jobs, with check, docs, and lints now passing. If it worked for those not sure why there is still the issue with the test jobs.

Is there some CI caching that could be keeping the bad state? Or am I missing something obvious?

@RoloEdits
Copy link
Copy Markdown
Contributor Author

RoloEdits commented Nov 17, 2025

I'm still not sure what was wrong, but I did check, and after the fetch it did indeed say that there was a change to that file, even when nothing was done to it. The normal ways tried above didn't fix it, so now changed to just remove the grammar folder and start fresh when it detects a new revision. I will open a new PR with that fix separately.

edit: #14817

@David-Else
Copy link
Copy Markdown
Contributor

I will open a new PR with that fix separately.

I think you left #14817 in this PR by accident.

@RoloEdits
Copy link
Copy Markdown
Contributor Author

RoloEdits commented Nov 18, 2025

I think its worth that being a separate PR (hence both open). I will just rebase this PR on top of master when that (or whatever the fix ultimately is) gets merged as a hacky workaround (I wish github had better support for stacked PRs, but alas).

@the-mikedavis
Copy link
Copy Markdown
Member

I cherry-picked 19126f4 out as 8df4de1. (So this PR is merged rather than closed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Markdown code block injection can leak to the surrounding context

3 participants