MagicStack / MagicStack/MagicPython

No difference between single and double quoted strings

Đang mở
#172 1 bình luận 2 reaction 1 người được giao Xem trên GitHub

@vpetrovykh đang làm issue này rồi.

Từ ngày 4/2/2019.

Ngôn ngữ chính
JavaScript
Star
1.4k
Fork
98
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.