language-markdown: custom syntax for code block

I’m trying making something like this

```ttt
some code without syntax highlight
```

and want the code to be highlighted just like well-known language syntax

```javascript
some code with syntax highlight
```

How can i do it?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 21 (11 by maintainers)

Most upvoted comments

I had checked the r markdown specification and had learn about the knitr engine. And I found these problems:

  • The language-markdown package works with the {javascript } code block, but I have to insert a whitespace between javascript and }. It seems a little bug.
  • In R markdown, in the '''{r } '''(for convenience, I’m using ’ to replace in this comment) pattern, the prefix{rshould be a keyword indicates that the R markdown parser should treat this "code block" as an "code chunk". The language used inside the chunk should be specified by theengineoption. For example,‘’‘{r engine=“javascript”} ‘’‘indicates that this code chunk contains javascript code. This is doced [here](http://yihui.name/knitr/demo/engines/). Any code chunk beginning label replaces therin’’'{r } ‘’'with other language name, should be an shorthand or theengineoption. doced [here](http://rmarkdown.rstudio.com/authoring_knitr_engines.html). Language-markdown package seems not supports theengine` option grammar.