Function: php-ts-mode--js-css-tag-bol
php-ts-mode--js-css-tag-bol is a byte-compiled function defined in
php-ts-mode.el.gz.
Signature
(php-ts-mode--js-css-tag-bol NODE PARENT &rest _)
Documentation
Find the first non-space characters of html tags <script> or <style>.
Return line-beginning-position when treesit-node-at is HTML or PHP.
Otherwise go to the PARENT and search backward for <script> or <style> tags.
Should be used only for Javascript or CSS indenting rules.
NODE, ignored, is the node to match and PARENT is its parent.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/php-ts-mode.el.gz
(defun php-ts-mode--js-css-tag-bol (_node parent &rest _)
"Find the first non-space characters of html tags <script> or <style>.
Return `line-beginning-position' when `treesit-node-at' is HTML or PHP.
Otherwise go to the PARENT and search backward for <script> or <style> tags.
Should be used only for Javascript or CSS indenting rules.
NODE, ignored, is the node to match and PARENT is its parent."
(let ((lang (treesit-language-at (point))))
(if (or (eq lang 'javascript)
(eq lang 'css))
(save-excursion
(goto-char (treesit-node-start parent))
(re-search-backward "<script.*>\\|<style.*>" nil t))
(line-beginning-position))))