Change single-word uses of the D macro in documentation with backticks#5801
Change single-word uses of the D macro in documentation with backticks#5801andralex wants to merge 2 commits intodlang:masterfrom
Conversation
|
cc @wilzbach can we also make this a standard check for future code? |
std/random.d
Outdated
| either side). Valid values for $(D boundaries) are $(D "[]"), $(D | ||
| "$(LPAREN)]"), $(D "[$(RPAREN)"), and $(D "()"). The default interval | ||
| either side). Valid values for `boundaries` are `"[]"`, $(D | ||
| "$(LPAREN)]"), `"[$(RPAREN`"), and `"(`"). The default interval |
|
Changed the sed expression to: sed -i '' -e 's/\$(D \([^ ()]*\))/`\1`/g' std/**/*.d |
|
What the heck did I do? Ugh... |
|
Thanks for your pull request, @andralex! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
1 similar comment
|
Thanks for your pull request, @andralex! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
|
OK here we go... |
|
This should be merged soon, it's a bonanza of rebase conflicts... |
PetarKirov
left a comment
There was a problem hiding this comment.
Looks good, as far as I could see. I'm in favor of merging and fixing possible issues (if any) in follow-up PR(s).
|
cool thx |
|
@andralex the ddoc build passed, so you can verify if there's anything unexpected: http://dtest.dlang.io/results/d970593fffa023018370dde1852998cd6bd83ff2/f8d3d9b2ade3031dc671481be922425e8577263a/. (I'll be able to look at it in 30-40 mins) |
|
Seeing artifacts that shouldn't be there, removed auto-merge for now to investigate. |
|
Here is the previous attempt, may contain useful discussion: #2877 |
|
@CyberShadow thanks. This particular PR is more conservative so it's mainly exposed to the problem of double highlighting of focal words (those that people get rid of by using a leading underscore). That problem is benign - it applies an anchor and a span style twice, so it increases file size but does not affect functionality. I suggest we pull this and create an issue for the backticks feature. |
std/base64.d
Outdated
| * Source: $(PHOBOSSRC std/_base64.d) | ||
| * Macros: | ||
| * LREF2=<a href="#$1">$(D $2)</a> | ||
| * LREF2=<a href="#$1">`$2`</a> |
There was a problem hiding this comment.
I think this is one of the culprits - see here:
- <a href="#.Base64Impl.Encoder.empty"><span class="d_inlinecode donthyphenate notranslate">empty</span></a> returns <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_keyword">true</code></span>.</div></div>
+ <a href="#.Base64Impl.Encoder.empty">`empty`</a> returns <span class="d_inlinecode donthyphenate notranslate">true</span>.</div></div>|
OK @CyberShadow warned that there are additional |
|
@ZombineDev good insight, I changed the macro to see how things go. BTW we already have that macro, right? No need for it. |
FWIW I also tried this before and failed: 😢
Well you do see all places where a @andralex let me know if I should adopt this PR and bring it to the finish line. After all, this is now at least the third attempt... |
|
@wilzbach yah, that would be nice but do it only if technically easy - it's not high impact. Thx! |
|
We really really need to kill that autoexpansion habit of ddoc that leads to |
#6391 (for all Phobos)
dlang/dlang.org#2307 (it never has been closer thanks to @quickfur's work on adding the opt-out macro) |
This replaces uses of
$(D ...)with backticks for single-word instances. This makes the doc easier on the eyes and easier to edit. To effect this I ran: