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 syntax highlighting is failing is some case #15

Closed
julian-poidevin opened this issue Sep 6, 2021 · 3 comments
Closed

code-block syntax highlighting is failing is some case #15

julian-poidevin opened this issue Sep 6, 2021 · 3 comments

Comments

@julian-poidevin
Copy link

Here's my code

*  Use additional *single indent* for ``break`` statement in each ``case`` or ``default``:

   .. code-block:: c

      /* OK, every case has single indent */
      /* OK, every break has additional indent */
      switch (check())
      {
          case 0:
              do_a();
              break;
          case 1:
              do_b();
              break;
          default:
              break;
      }
  
      /* Wrong, case indent missing */
      switch (check())
      {
      case 0:
          do_a();
          break;
      case 1:
          do_b();
          break;
      default:
          break;
      }
  
      /* Wrong */
      switch (check())
      {
          case 0:
              do_a();
          break;      /* Wrong, break must have indent as it is under case */
          case 1:
          do_b();     /* Wrong, indent under case is missing */
          break;
          default:
              break;
      }

Here's VSCode Highlighting

image

How it's rendered

image

Observation

As #13, the code highliting from the extension and GitHub seems broken.

@trond-snekvik
Copy link
Owner

This appears to be the same issue as #13, and has been fixed in 6b0bec6. Thanks for reporting!

@trond-snekvik
Copy link
Owner

This snippet now looks like this in v1.5.0:
image

@julian-poidevin
Copy link
Author

I didn't know if this was the same root cause as #13, thanks !

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

No branches or pull requests

2 participants