If I try to post a code with #include ’s using the angle-bracket syntax, immediately after a bullet list item, the formatting breaks.
Here is the original preformatted text:
#include <juce_audio_formats/juce_audio_formats.h>
#include <juce_audio_processors/juce_audio_processors.h>
The same thing is posted in both places.
sam1
May 2, 2016, 12:52am
2
Try:
- Issue-reproducing example:
#include <juce_audio_formats/juce_audio_formats.h>
#include <juce_audio_processors/juce_audio_processors.h>
The same thing is posted in both places.
You need 6 spaces as opposed to 3 when in a list
1 Like
I think what he meant is that you can’t have a code block after a list, as in
(It works if you have this paragraph in between)
Function foo(int bar)
{
// stuff
}
On the other hand without that paragraph in between:
I think this is a case where the markdown syntax is a bit ambiguous. I don’t know how to work around this.
1 Like
Discussed on Stack Exchange
What seems to work well in this scenario is:
Option A (caret plus five spaces), Markdown:
- point one
- point two
> #include <juce_audio_formats/juce_audio_formats.h>
> #include <juce_audio_processors/juce_audio_processors.h>
>
> void myCode (int arg)
> {
> // do stuff
> {
Option A (caret plus five spaces), Result:
#include <juce_audio_formats/juce_audio_formats.h>
#include <juce_audio_processors/juce_audio_processors.h>
void myCode (int arg)
{
// do stuff
{
Option B (eight spaces), Markdown:
- point one
- point two
#include <juce_audio_formats/juce_audio_formats.h>
#include <juce_audio_processors/juce_audio_processors.h>
void myCode (int arg)
{
// do stuff
{
Option B (eight spaces), Result:
I think one of those is probably what @tsenkov was after…?
1 Like
Thanks guys. And sorry for the late response.
Cheers!