Closed seanpdoyle closed 4 years ago
Does this help with and/or resolve https://github.com/thoughtbot/middleman-aria_current/issues/16?
It does!
I've tried to run the tests locally, but I haven't had any luck.
To prove that it works: https://github.com/seanpdoyle/git-read/commit/b53a0d941e26d69fd36cccfba1b5ffce74bc127a will build the navigation links on the left side of https://seanpdoyle.github.io/git-read/.
Invoke the
link_to
helper with the original arguments, save for the modifiedoptions
Hash.Prior to this commit, the
current_link_to
helper was unable to yield a block and capture the contents to be rendered as children to the resulting<a>
element.The presence or absence of the
&block
as an argument is only useful to determine which index in the argument list references thelink_to
invocation's desiredpath
value.Since the
text
(or contents of theyield
-ed block) is unmodified, we can delegate to the underlyinglink_to
helper with the original "splatted"*arguments
value.