doxygen markdown fails to parse fenced code block
Date : March 29 2020, 07:55 AM
Any of those help This looks trivial in hindsight, but I spent a lot of time debugging it, so thought I should share it with the community. The problem was that the number of tildes ~ at the start and end of the fenced block should be equal. Minimum 3 tildes are required to mark a fenced block, but to make the fenced block more easily visible, I like extending them to the complete line. I had originally copy-pasted the starting line at the end, but I then removed a few ~s to make room for the {.cpp}.
|
doxygen markdown fenced code block conflict with indented list
Date : March 29 2020, 07:55 AM
To fix the issue you can do It is a limitation (or bug if you will). Normally everything that is indented with 4 or more spaces will be shown verbatim (code block), but for lists the relative indent counts as the indentation (so 2 spaces in your example). Since the fenced block is handled before the lists are resolved, you get that the fenced block is not seen as such (too much indentation during this pass) but also not turned into verbatim section later on (due to the relative indentation during that pass).
|
doxygen markdown prevent syntax highlighting in fenced code block
Date : March 29 2020, 07:55 AM
it should still fix some issue Doxygen will apply syntax highlighting to a fenced code block based on either an explicit language ({.cpp}) or on the implicit language (the language of the code currently being parsed). If the language is not recognized, It appears to assume C/C++ syntax highlighting rules. Unfortunately, this means that the code will be formatted according to one of the languages supported by Doxygen, and there isn't a way to trick it into displaying the fenced code block without syntax highlighting.
|
fenced code blocks when converting R Markdown to pdf
Tag : r , By : rixtertech
Date : March 29 2020, 07:55 AM
it helps some times With ``` you introduce a plain markdown code block but not a knitr code chunk. But the output you expect (fencing, highlighting, shading) is the style knitr adds to its code blocks. Therefore, use ```{r} to wrap code in knitr chunks (use eval = FALSE if you don't want the code to be evaluated). This can also be used for non-R code blocks: As long as the code is not evaluated, the language doesn't matter. ---
output:
pdf_document
---
```
Plain markdown code block.
```
```{r}
print("This is a knitr code chunk.")
```
```{r, eval = FALSE}
print("This is a knitr code chunk that isn't evaluated.")
```
Chunk with Python code (borrowed from http://stackoverflow.com/q/231767/2706569), *wrong* (no) highlighting:
```{r, eval = FALSE}
if self._leftchild and distance - max_dist < self._median:
yield self._leftchild
```
Chunk with Python code, *correct* highlighting:
```{r, eval = FALSE, engine = "python"}
if self._leftchild and distance - max_dist < self._median:
yield self._leftchild
```
Chunk with Python code, *correct* highlighting (alternative notation):
```{python, eval = FALSE}
if self._leftchild and distance - max_dist < self._median:
yield self._leftchild
```
|
Flask-Markdown / Flask-Misaka filter wrapping Markdown in pre tag
Date : March 29 2020, 07:55 AM
With these it helps Ok, so the {% filter markdown %} needs to be in the same tab line as the markdown content. Easy fix but frustrating process. i.e. {% filter markdown %}
# Title
content
List:
* a
* b
* c
{% endfilter %)
{% filter markdown %}
# Title
content
List:
* a
* b
* c
{% endfilter %}
|