Markdownify code syntax from the old $(D code) macros to Markdown (i.e. code) #5183
Markdownify code syntax from the old $(D code) macros to Markdown (i.e. code) #5183wilzbach wants to merge 2 commits intodlang:masterfrom
code) #5183Conversation
|
I'm actually against this, somewhat strongly. The backtick and the
will render as two different things in dmd today.... (yet as the same thing in ddox today. I call that a bug in ddox!)
Just today, I implemented context-aware cross referencing in dpldocs.info that uses the I specifically did not apply that to backticks because they are often used on non-D code (the reason I pushed for them in dmd was to document xml samples in my dom.d...) and attempting name lookup and syntax highlighting there can lead to silly results. It isn't disastrous but it is less than ideal and IMO a step backwards from where we are now. Knowing the language of code snippets leads to more intelligent output. |
|
Yah, prolly we should keep this for single words only for the time being. |
Closing as well. |
|
@wilzbach @adamdruppe I very much appreciate how you handled this. Thanks!! |
Gets Phobos one step closer to pretty code ;-)
While the detection is easy with a stupid RegExp, I needed to write a small lexer as it's context-sensitive:
Ideally DAutoTest shouldn't show any changes.