Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.

Commit

Permalink
docs on line breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwilliams committed Apr 13, 2021
1 parent 51910d6 commit 495723d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ Refer to JS/TS tokens syntax at https://github.com/microsoft/vscode/tree/master/

To check how tokens are being matched, select "Developer: Inspect Editor Tokens and Scope" under Command Palette.

### "A line break seems to break the syntax highlighting"

Many of the bugs raised are due to multiline regex not being available.
Textmate grammar can [only match a single line](https://github.com/microsoft/vscode-textmate/issues/32). Unfortunately a lot of the regex we have tries to parse multiple lines at once (which won't work).
This has caused bugs to be raised such as: https://github.com/styled-components/vscode-styled-components/issues/266 and https://github.com/styled-components/vscode-styled-components/issues/277

The best fix is to look at the new line and create a new rule in https://github.com/styled-components/vscode-styled-components/blob/master/syntaxes/styled-components.json which will match that line as close as possible whilst still being generic. Regex101 helps with this.

## Intellisense issues

Intellisense is handled by https://github.com/microsoft/typescript-styled-plugin.
Expand Down

0 comments on commit 495723d

Please sign in to comment.