-
-
Notifications
You must be signed in to change notification settings - Fork 701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix links from $(D $(LREF ...)) -> $(LREF ...) #5242
Conversation
Should we add a check like |
sed -E 's/[$]\(D [$]\(LREF (.*)\)\)/$(LREF \1)/' -i **/*.d
@wilzbach of course, please! Automation is a work divider and a result multiplier. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome possum
(why no auto-merge-squash in this repo?) |
good stuff! another thing i've love to do is to eventually remove ALL the |
$(TD Joins a couple of functions into one that executes the original | ||
functions independently and returns a tuple with all the results. | ||
)) | ||
$(TR $(TD $(D $(LREF compose)), $(D $(LREF pipe))) | ||
$(TR $(TD $(LREF compose)), $(LREF pipe) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait a minute this looks wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be $(TR $(TD $(LREF compose), $(LREF pipe))
. The regular expression didn't handle nested parenthesis correctly and now the second link will show up outside the table cell.
$(TD Forwards function arguments while saving ref-ness. | ||
)) | ||
$(TR $(TD $(D $(LREF lessThan)), $(D $(LREF greaterThan)), $(D $(LREF equalTo))) | ||
$(TR $(TD $(LREF lessThan)), $(LREF greaterThan)), $(D $(LREF equalTo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is wrong too.
$(TD Creates a function that binds the first argument of a given function | ||
to a given value. | ||
)) | ||
$(TR $(TD $(D $(LREF reverseArgs)), $(D $(LREF binaryReverseArgs))) | ||
$(TR $(TD $(LREF reverseArgs)), $(LREF binaryReverseArgs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And another. Methinks regex is too greedy for this. Relatively small set to fix up by hand though (I just did it for the merge conflict on my adrdox fork, alas I can't do a PR straight off that due to the myriad other differences that have accumulated there over the last year).
$(TD Converts a callable to a delegate. | ||
)) | ||
$(TR $(TD $(D $(LREF unaryFun)), $(D $(LREF binaryFun))) | ||
$(TR $(TD $(LREF unaryFun)), $(LREF binaryFun) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you get hte idea i won't comment every oen
I guess none of these are a simple sed call since regex doesn't handle paren matching very well. But I g2g, church time and the whole day is fairly busy. I'll be back on email later in the evening though. |
Martin killed it yesterday: dlang/dlang-bot#64
Yeah it should have been sth. like, but it was way too late for me :/ sed -E 's/[$]\(D [$]\(LREF ([^)]*)\)\)/$(LREF \1)/' -i **/*.d |
I have a couple of replacement script based on libdparse lying around, so it shouldn't be too difficult to make that work. However, we would need to fix DDoc first as those |
On Sun, Mar 05, 2017 at 08:46:51AM -0800, Sebastian Wilzbach wrote:
I have a couple of replacement script based on libdparse lying around, so it shouldn't be too difficult to make that work. However, we would need to fix DDoc first as those `_symbolname` are hacks to work around DDocs feature of auto-recognizing the function/module name in the documentation.
There's an easy soultion to that though:
DDOC_PSYMBOL=$0
in the macro file. Defining it out of existence means even if it is triggered,
it just displays the original text to begin with. Then we transition
Phobos, then can kill it in dmd to finish off the "feature" for good...
or not, once it is defined to identity the only problem is if you intentionally
wrote the underscore and it disappeared in the output, but that's exceedingly
rare anyway.
|
I was more referring to the fact that there needs to be a consensus / agreement that we get rid off this "feature". Do you care enough to make a short post on the NG about it? |
http://forum.dlang.org/post/[email protected] I think we should just do it anyway though, Phobos already pretty consistently uses the underscore EVERYWHERE, indicating that the authors nearly every time want to turn the behavior off, and I doubt anyone will come in and say "yeah that's an awesome feature that I want more often than not". Besides, we don't need approval from the community to kill it in Phobos - dlang.org and phobos are free to define its own macro set anyway! But I posted since I am genuinely curious if ANYONE finds it useful. |
From the NG
Your wish has been heard:
CC @andralex @adamdruppe