Bug or am I missing something

I suddenly discovered something that I haven’t seen before. I was writing in a markdown document and came to the bottom of the window, I continued to write but DT didn’t show what I was writing and I can’t scroll the source view. Here I was playing with syntax highlighting (which I haven’t managed to get to work) but the same thing happens when I just type text. Here is how it looks:

Am I missing something, or is this a bug?

This is a known issue which will be fixed by the next release.

1 Like


I note you were puttig a fenced code block with python in the first line.
If you are hoping to use syntax highlighting, the correct form is language-python.


Curious question: in all other places I’ve used fenced code blocks so far the it has been


Why is it different in DT? (some decision, or just a consequence of using the javascript library?)

I don’t know what other places you’re referring to but this is specifically the Prism.js syntax.



and of course

They’re all showing code fences with short forms of the language (i.e. ruby instead of language-ruby). I’d wager that these are some other places :slight_smile:

I agree that prism.js uses language-xxxx, but that is not related to the MD renderer: it could simply prepend the language- to any xxxx it finds at the start of the code fence and pass the whole thing onto prism. I think that DT should follow the MD conventions here (see above for the Github and markdownguide links). Or it should be forgiving enough to add the language- prefix if it is missing.

1 Like

We aren’t doing anything specific here except using the Prism.js extension as-is. So I suppose this would be a question for the author of Prism. :slight_smile:

Major site - GitHub. Apps: bbedit, marked, ulysses, bear, etc.

This is literally the first time I’ve seen anything else.


+ 1

After investigating a bit… You’re of course right in that prism uses class names with a leading lang- or language-. OTOH, the MD-to-HTML converter produces this

<code class="javascript">

from this


If, instead it would convert this start of a code fence to
<code class="language-javascript">
all would be easy-peasy. May be it’s possible to have the converter have a look at the string after the start of the code fence and adjust the class name accordingly? That would bring it more in line with the leading other MD converters, I think.