MagicStack / MagicStack/MagicPython

No difference between single and double quoted strings

Aberta
#172 1 comentário 2 reações 1 responsável Ver no GitHub

@vpetrovykh já está trabalhando nisso.

Desde 4/2/2019.

Linguagem predominante
JavaScript
Estrelas
1.4k
Forks
98
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

Ok I'm sorry if I don't take the time to use your template and try to prepare a pull request and all that stuff. I'm just not used to it.

I already spent much time on solving the issue for myself. And I only post here to share my solution.

If somebody is experimented with pull requests and all those things, below is my diff.

Also, if anybody finds this issue from google they will have the option to just apply the diff.

**SOLUTION**

Put the fix-string-quoted-double.patch (file below) in the relevant location of the extension.
Should be something like `~/.vscode/extensions/magicstack.magicpython-1.1.0/grammars/src`

Then go to this location and execute `git apply fix-string-quoted-double.patch`

> fix-string-quoted-double.patch
```diff
diff --git a/MagicPython.syntax.yaml b/MagicPython.syntax.yaml
index f885059..c6f6ae4 100644
--- a/MagicPython.syntax.yaml
+++ b/MagicPython.syntax.yaml
@@ -86,7 +86,7 @@ repository:

- file: 'regexp.wrapper.syntax.yaml'
vars:
- scopename: string.regexp.quoted.single.python
+ scopename: string.regexp.quoted.double.python
prefix: 'double-one-'
basename: 'regexp'
nested: ''
@@ -160,7 +160,7 @@ repository:

- file: 'regexp.wrapper.syntax.yaml'
vars:
- scopename: string.regexp.quoted.single.python
+ scopename: string.regexp.quoted.double.python
string.interpolated.python
prefix: 'double-one-'
basename: 'fregexp'
@@ -183,7 +183,13 @@ repository:
- file: 'pystring.inc.syntax.yaml'
vars:
line: single
- marker: (['"])
+ marker: "'"
+ guard: "|((?

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.