Fenced code block with lang hint breaks subsequent formatting

A test google link and some simple formatting.

A fenced code block, with language set to C++ ( ```C++):

#include "MIDIUSB.h"

#define ENCODER_PIN_A A3
#define ENCODER_PIN_B A2
#define NUMBER_CLICKS 30 // the number of clicks per rotation of the encoder

#define SLIDER_PIN A1
#define SLIDER_MAX 1015 // my fader has a tiny resistance when completely open

unsigned long loopTime;
uint8_t encoder_state_prev;
uint8_t encoder_pos_prev = 0;
uint8_t slider_7bit_prev = 0;

A test google link and some simple formatting.

A new paragraph.

Another fenced code block:

test

If you are seeing raw markdown above the test code block, something is amiss. :slight_smile:

Changing the language for the first fenced code block to cpp or leaving it blank fixes the problem, but using C++ or c++ both cause it to happen, which is odd if we’re still using highlight.js because it seems to indicate that it should work?

This seems possibly related to this topic:

Though in this case I’m not using curly braces, but normal (I think markdown compliant fenced blocks).

Here is a gist with the top part of this post (apparently working ok on github):

1 Like

For me this is a definitive duplicate of the topic you linked.

All bugs of this category are being postponed, and will be revisited when the switch to markdown-it happens, because it fixes it.

3 Likes

Thank you for the heads up! I’ll wait for the markdown-it switch. :slight_smile:

This topic was automatically closed after 3 hours. New replies are no longer allowed.