-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use rx instead of a manually created regex
- Loading branch information
Showing
1 changed file
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
;; Maintainer: Stefan Möding <[email protected]> | ||
;; Version: 0.1.0 | ||
;; Created: <2024-03-02 13:05:03 stm> | ||
;; Updated: <2024-05-30 08:28:01 stm> | ||
;; Updated: <2024-05-30 08:29:29 stm> | ||
;; URL: https://github.com/smoeding/puppet-ts-mode | ||
;; Keywords: languages | ||
;; Package-Requires: ((emacs "29.1")) | ||
|
@@ -845,9 +845,11 @@ module and file according to Puppet's autoloading rules." | |
(moddirs (mapcar (lambda (dir) (expand-file-name module dir)) | ||
puppet-ts-module-path)) | ||
;; the regexp to find the resource definition in the file | ||
(resdef (concat "^\\(class\\|define\\|type\\|function\\)\\s-+" | ||
resource | ||
"\\((\\|{\\|\\s-\\|$\\)")) | ||
(resdef (rx bol | ||
(or "class" "define" "function" "type") | ||
(1+ whitespace) | ||
(literal resource) | ||
word-boundary)) | ||
;; files to visit when searching for the resource | ||
(files '())) | ||
;; Check the current module directory (if the buffer actually | ||
|