I’m not sure there is a good way to do this, sadly. This is more tractable with Markdown than Notebooks, at the moment. What’s wrong with the current highlighting? Doesn’t look so bad to me
Thanks for the reply, so the main issue in the comments. The current syntax just comments out all the #defines and includes.
Anyhow, I’ll manage, thanks.
If you make use of cling it has automatic code highlighting in jupyter, but it is a full c++ „interpreter“ so you can actually run the code. But maybe you can take only the highlighting pieces from it, if that is what you need:
Thanks. I do get correct highlighting for C++ in jupyter. It’s just that conversion process of fastpages always assumes python.
I’m having a look at the conversion scripts now to see if something can be done
my assumtion (although possibly completely wrong) is that at some point the code cell from the notebook just gets turned into a markdown code block.
if that’s the case it should be easy enough to add a #language option we could add at the top of the cell to created a fenced code block so you could add #language-cpp or #language-sql which would turn into
``` cpp
int main(void){
}
```
in the markdown conversion. if you can get it to do that then you don’t need any other changes (although the dracular highlighting fast pages uses by default isn’t that pretty for c++)
Try switching from the dark to the light theme. Instructions are in the README. Perhaps that will accomodate C highlighting since it is supported by Minima
I don’t have any c++ code so it doesn’t bother me. It does work for other languages but for some languages there’s more pink than anything else so it wouldn’t necessarily be your first choice, that’s all.