Open ChillarAnand opened 9 years ago
There usually is, it's just a little hard to identify whether a block is code or text, and what language sould be used to highlight in that case. For instance, we don't yet check for language tags, we just use some reasonable heuristics.
Could you provide a link to that post so that we can figure out what to do?
@Malabarba http://stackoverflow.com/questions/31167228/python-list-to-dict-conversion-confusion
thanks for amazing sx.el!!
Ok thanks. This is indeed one of those cases that would be solved if we took question tags into consideration. @vermiculus and I have been very busy lately, but I promise we'll get to it at some point!
Will it be slow if we toggle syntax highlight on big source code block? Like Org-mode, it will slow down.
@stardiviner No, it shouldn't be slow because we only perform syntax highlighting once (when the question buffer is first created), whereas typical major-modes usually have to do it on every redisplay.
I see. That's great.
Any progress on this? It seems like it should be fairly easy to implement and it would really help when reading posts that have a lot of code.
No progress as of yet that I'm aware of (both of us are very busy and really can only find the time for things we need at this moment), but pull requests are welcome!
@vermiculus Alright. Do you think you could give any advice on where to start for implementing this?
You're going to want to start around sx-question-mode--insert-markdown
.
it will be good if there is syntax highlighting for code.