MagicStack / MagicStack/MagicPython

No difference between single and double quoted strings

未關閉
#172 1 則留言 2 個 reaction 已指派 1 人 在 GitHub 檢視

@vpetrovykh 已經在處理了。

開始於 2019年2月4日。

主要語言
JavaScript
星號
1.4k
分支
98
PR 合併指標
30 天內沒有已合併 PR

描述

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: "|((?

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。