MarkdownOutlook icon indicating copy to clipboard operation
MarkdownOutlook copied to clipboard

Not support source code syntax highlight?

Open weyou opened this issue 9 years ago • 4 comments

I tried the markdown for source code and table, but both of them get no rendering.

weyou avatar Mar 17 '15 03:03 weyou

You can do code fencing with backticks but you cannot specify the language for syntax highlighting :(

felixfbecker avatar Nov 02 '15 19:11 felixfbecker

It doesn't process "code blocks" (triple-backticks) properly. For instance:

```
x = 1
y = 2
```

translates to x = 1 y = 2 (no newlines). Furthermore, it continues to parse md-like text within the code blocks:

```
# this is a comment
x = 1
```

The comment becomes a header.

I suspect that it isn't considering triple-backticks special at all; in fact, if you replace all triple-backticks above with single-backticks, it behaves identically, suggesting that in the triple, the first two open/close the block with no apparent effect.

r2evans avatar Feb 18 '17 19:02 r2evans

I am not actively working on this but I will accept/review PRs.

mmanela avatar Feb 18 '17 22:02 mmanela

It supports code blocks now, but it would also good if it supports language-specific code blocks, such as ```sh. Or at least, gracefully switch language-specific blocks to plain code blocks ( ```sh does not work, it should at least make the text monospaced).

felipecrs avatar Sep 11 '20 20:09 felipecrs