microsoft / microsoft/vscode-textmate

Absolute rule reference use local scope

Open
#173 2 comments 0 reactions 1 assignee View on GitHub

@hediet is already working on this.

Since May 2, 2022.

bug
Dominant language
TypeScript
Stars
678
Forks
135
Avg merge
1d 14h
Merged PRs (30d)
2

Description

I think this line:
https://github.com/microsoft/vscode-textmate/blob/9157c7f869219dbaf9a5a5607f099c00fe694a29/src/grammar.ts#L147

should rather be this:

collectSpecificDependencies(result, baseGrammar, baseGrammar, includedName, baseGrammar.repository);

Also, this line:
https://github.com/microsoft/vscode-textmate/blob/9157c7f869219dbaf9a5a5607f099c00fe694a29/src/grammar.ts#L149

should be this:

collectSpecificDependencies(result, baseGrammar, selfGrammar, includedName, selfGrammar.repository);

Let's say source.md embeds source.css and a rule in source.css references source.md#link.
Then with the logic in main, a rule in source.css referencing source.md#link would look up link in its local repository (first repositories of this rule or parent rules, then the repository of source.css), but not in the repository of source.md.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.