Skip to content

Conversation

@andralex
Copy link
Member

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:

sed -i '' -e 's/\$(D \([^ )]*\))/`\1`/g' std/**/*.d

@andralex
Copy link
Member Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad substitutions here.

@andralex
Copy link
Member Author

Changed the sed expression to:

sed -i '' -e 's/\$(D \([^ ()]*\))/`\1`/g' std/**/*.d

@andralex
Copy link
Member Author

What the heck did I do? Ugh...

@andralex andralex reopened this Oct 24, 2017
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @andralex!

Bugzilla references

Your 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
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @andralex!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

@andralex
Copy link
Member Author

OK here we go...

@andralex
Copy link
Member Author

This should be merged soon, it's a bonanza of rebase conflicts...

Copy link
Member

@PetarKirov PetarKirov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@andralex
Copy link
Member Author

cool thx

@PetarKirov
Copy link
Member

@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)

@andralex
Copy link
Member Author

Seeing artifacts that shouldn't be there, removed auto-merge for now to investigate.

@CyberShadow
Copy link
Member

Here is the previous attempt, may contain useful discussion: #2877

@andralex
Copy link
Member Author

@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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

@andralex
Copy link
Member Author

OK @CyberShadow warned that there are additional _ inserted in the generated HTML, which makes this PR not viable without fixing the ddoc bug.

@andralex
Copy link
Member Author

@ZombineDev good insight, I changed the macro to see how things go. BTW we already have that macro, right? No need for it.

@wilzbach
Copy link
Contributor

Here is the previous attempt, may contain useful discussion: #2877

FWIW I also tried this before and failed: 😢
#5183

which makes this PR not viable without fixing the ddoc bug.

Well you do see all places where a _ needs to be inserted on DAutoTest.

@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...

@andralex
Copy link
Member Author

@wilzbach yah, that would be nice but do it only if technically easy - it's not high impact. Thx!

@quickfur
Copy link
Member

We really really need to kill that autoexpansion habit of ddoc that leads to _ proliferation. It's clearly causing far more trouble than it's worth, and for far too long already.

@wilzbach
Copy link
Contributor

@wilzbach yah, that would be nice but do it only if technically easy - it's not high impact. Thx!

Yeah, it's pretty trivial to do, but I just did it for std.algorithm as a test:
#5970

@wilzbach
Copy link
Contributor

Yeah, it's pretty trivial to do, but I just did it for std.algorithm as a test:
#5970

#6391 (for all Phobos)

We really really need to kill that autoexpansion habit of ddoc that leads to _ proliferation. It's clearly causing far more trouble than it's worth, and for far too long already.

dlang/dlang.org#2307 (it never has been closer thanks to @quickfur's work on adding the opt-out macro)

@wilzbach wilzbach closed this Mar 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants