Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Multiple bugs related to comment grammar #25

Closed
Xeverous opened this issue Nov 27, 2021 · 6 comments · Fixed by #26
Closed

Multiple bugs related to comment grammar #25

Xeverous opened this issue Nov 27, 2021 · 6 comments · Fixed by #26

Comments

@Xeverous
Copy link

Xeverous commented Nov 27, 2021

Example 1:

- item A
- item B

...text after triple dot

Expected: elements are recognized as a list and text block.

Actual: the entire paragraphs that starts with ... is treated as a comment, which is just wrong.

Example 2:

- list item A
- list item B

..

    indented text

text

Actual: indented text is highlighted as a comment, which is incorrect. .. is used intentionally here to end the list, otherwise intended text would be treated as a subelement of the list item B. Such use of .. is even presented in reST examples.


Edit: I will try to post more examples if I encounter something reproducible, but so far I can say everything I have seen gone wrong was related to parsing of ...

@trond-snekvik
Copy link
Owner

Hi, perhaps I'm misunderstanding what you would consider the expected behavior, but I'm not able to reproduce these examples:
image

Would you be able to provide a screenshot of the issue?

@Xeverous
Copy link
Author

image

VSC Help -> About:

Version: 1.62.3 (system setup)
Commit: ccbaa2d27e38e5afa3e5c21c1c7bef4657064247
Date: 2021-11-17T08:11:14.551Z
Electron: 13.5.2
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 6.1.7601

@trond-snekvik
Copy link
Owner

Thanks! Which version of the extension do you have installed, and do you have any other extensions that would affect rst files?

@Xeverous
Copy link
Author

v1.5.1

other reST extensions:

  • reStructuredText v167.0.0 (from LeXtudio)

@trond-snekvik
Copy link
Owner

Thanks, I was able to reproduce this, and made a fix in #26, but this introduces a new issue where all blank lines in comments terminate the comment block, which isn't correct. I'll work on it some more, but if you want to test it, you can find the .vsix as a build artifact in that PR

@trond-snekvik
Copy link
Owner

Sorry for the crazy long delay on this. I was able to resolve the issues I were seeing, and with the help of the test framework contributed in #34, I've added a couple of test cases that covers this scenario.

I have merged the fix, and will make a new release on the marketplace.
image

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants