module

Hecr::LSP::Selection

Sub-tag spans for selectionRange expansion: the {expression}, the attribute, and the whole open tag containing a position (line-local; the enclosing element pairs above these come from TagPairs).

Constants

ATTR = /[a-zA-Z_:@][a-zA-Z0-9_:.\-]*(?:=(?:"[^"]*"|'[^']*'|\{(?:[^{}]|\{[^{}]*\})*\}))?/
BRACES = /\{(?:[^{}]|\{[^{}]*\})*\}/
TAG = /<\/?(?:[^<>"'{}]|"[^"]*"|'[^']*'|\{(?:[^{}]|\{[^{}]*\})*\})*>/

Instance methods

levels(line : String, character : Int32) : Array(Tuple(Int32, Int32))

Char spans on the line containing character, innermost first.

Source