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

code block bracket pair lines on certain characters #19

Closed
tim-rackn opened this issue Nov 3, 2021 · 6 comments · Fixed by #22
Closed

code block bracket pair lines on certain characters #19

tim-rackn opened this issue Nov 3, 2021 · 6 comments · Fixed by #22

Comments

@tim-rackn
Copy link

Paste the following into a .rst file. Where there are two ` or two |, you will see bracket pair lines.

.. code-block::

    something `   `

    or other to fill 


.. code-block:: 

    asdf | |
    
    asdfasdfasdf

    asdfasdfasdfasdfasdfasdf


asdfasdfasdfasdfasdfasdfasdfasdf

System info:

CPUs	11th Gen Intel(R) Core(TM) i9-11950H @ 2.60GHz (16 x 2600)
GPU Status	2d_canvas: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: disabled_off opengl: enabled_on rasterization: disabled_software skia_renderer: enabled_on video_decode: disabled_software vulkan: disabled_off webgl: enabled webgl2: enabled
Load (avg)	1, 1, 0
Memory (System)	62.58GB (55.14GB free)
Process Argv	--unity-launch --crash-reporter-id 1af35db0-45f1-4b6d-b970-dd7fb5b9896f
Screen Reader	no
VM	0%

A/B Test

vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30283811
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30384385
pythondataviewer:30285071
pythonvsuse255:30340121
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
vsccppwt:30382697
bridge0708:30335490
pygetstartedt3:30385195
dockerwalkthru:30377721
bridge0723:30353136
pythonrunftest32:30373476
pythonf5test824:30373475
javagetstartedt:30391933
pythonvspyt187:30373474
vsqsis400:30386382
vsaa593:30376534
vssld246:30386377
@swestlake
Copy link

swestlake commented Nov 3, 2021

@trond-snekvik

code-block is only documented from a sandbox experiment, and doesn't look like it made official documentation. (reading from the original rst project site)

it only complicates things because if the user were to use conversion utilities, they shouldn't have to worry about directives that go out of the offficial specifications.

there is "::" (which the vs-rst code doesn't support) and ".. code::".

both ".. code::" and ".. code-block::" pass -- but I don't know why the latter is supported as it is not marked anywhere as part of any of the rst project documents.

@swestlake
Copy link

@tim-rackn i'm using v1.50(current latest) on linux here and I haven't seen that problem ... I think it helps easier to post the version that you're using for the programmers to verify against.

@tim-rackn
Copy link
Author

tim-rackn commented Nov 3, 2021

Sorry about that....

Version: 1.61.2
Commit: 6cba118ac49a1b88332f312a8f67186f7f3c1643
Date: 2021-10-19T14:58:13.605Z
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.14.14-300.fc35.x86_64

reStructuredText Syntax highlighting version: v1.5.0

@tim-rackn
Copy link
Author

tim-rackn commented Nov 3, 2021

@swestlake, I tried it with both .. code:: and .. code-block::. I am still seeing the same behavior.

I meant to provide a screenshot of what I see. Hope that helps some?
image

I used code-block for lack of reading docs and because it was already in use for the docs I was editing. Thanks for the reminder to RTFM. I'm heading back to review reStructuredText documentation and will likely refactor that out everywhere in my docs in the meantime.

@tim-rackn
Copy link
Author

Updated #19 (comment) to include plugin version running.

trond-snekvik added a commit that referenced this issue Nov 6, 2021
These are causing the new bracket colorization to go wrong, and
shouldn't be included in this list, as they're not technically brackets
in the same way that ( and ) are brackets.

Fixes #19.
@trond-snekvik
Copy link
Owner

Thanks for reporting, that looks super wonky. I haven't been using the bracket colorization, so I haven't noticed this. Fixed in #22 by removing backticks and | from the bracket list, they should just be treated as surrounding pairs.
Your snippet looks like this on my machine now:
image

Thanks for the detailed report!

trond-snekvik added a commit that referenced this issue Nov 6, 2021
These are causing the new bracket colorization to go wrong, and
shouldn't be included in this list, as they're not technically brackets
in the same way that ( and ) are brackets.

Fixes #19.
# 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.

3 participants