Skip to content

Commit

Permalink
fix(htmlAttribute): attributes with a - not picked up #101
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Aug 14, 2024
1 parent 3a18c03 commit 0efb983
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/various-textobjs/charwise-textobjs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,10 @@ end

---@param scope "inner"|"outer" inner selector is only the value of the attribute inside the quotation marks.
function M.htmlAttribute(scope)
local pattern = [[(%w+=["']).-(["'])]]
local pattern = {
'([%w-]+=").-(")',
"([%w-]+=').-(')",
}
M.selectTextobj(pattern, scope, config.lookForwardSmall)
end

Expand Down

0 comments on commit 0efb983

Please sign in to comment.