You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the following component, <x-button class="btn" />
I want to format that onto multiple lines like so, to make the markup more vertical:
<x-button
class="btn"
/>
I've found that the navigation does not work because blade-nav is not able to find the component name. If I add a single whitespace character at the end of that line, the navigation works as expected. I think the key is to edit the strategy for finding a start and end position in gf.lua:274.
I have a pull request here. I added a fallback regex that just looks for the end of the line instead of the name-ending characters in the original: local start_pos, end_pos = text:find("[,%s>%)]", col) or text:find("$", col), text:find("$", col)
This provides the last character index of the line as the start_pos and end_pos (which is fine because start_pos is replaced in the backwards search anyway). However, I'm very open to suggestions for this solution.
The text was updated successfully, but these errors were encountered:
Hi!
Given the following component,
<x-button class="btn" />
I want to format that onto multiple lines like so, to make the markup more vertical:
I've found that the navigation does not work because blade-nav is not able to find the component name. If I add a single whitespace character at the end of that line, the navigation works as expected. I think the key is to edit the strategy for finding a start and end position in gf.lua:274.
I have a pull request here. I added a fallback regex that just looks for the end of the line instead of the name-ending characters in the original:
local start_pos, end_pos = text:find("[,%s>%)]", col) or text:find("$", col), text:find("$", col)
This provides the last character index of the line as the
start_pos
andend_pos
(which is fine becausestart_pos
is replaced in the backwards search anyway). However, I'm very open to suggestions for this solution.The text was updated successfully, but these errors were encountered: