Skip to content

Add support for script setup, new in Vue 3 #115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 1, 2024

Conversation

garyo
Copy link
Contributor

@garyo garyo commented Sep 13, 2021

Vue 3 has "script setup"; see https://v3.vuejs.org/api/sfc-script-setup.html#basic-syntax for info.
This change updates the script regex to allow for script setup there.

@MelvinTo
Copy link

The same line should also be added to const vue--front-tag-regex

@akicho8
Copy link

akicho8 commented Apr 9, 2022

I hope this PR will be released quickly.

@akicho8
Copy link

akicho8 commented Apr 9, 2022

@garyo Can you fix?

The same line should also be added to const vue--front-tag-regex

  (defconst vue--front-tag-regex
    (concat "<%s"                        ; The tag name
            "\\(?:"                      ; Zero of more of...
            "\\(?:\\s-+" vue--not-lang-key "[\"'][^\"']*?[\"']\\)" ; Any optional key-value pairs like type="foo/bar".
            ;; ^ Disallow "lang" in k/v pairs to avoid matching regions with non-default languages
            "\\|\\(?:\\s-+scoped\\)"      ; The optional "scoped" attribute
            "\\|\\(?:\\s-+module\\)"      ; The optional "module" attribute
            "\\|\\(?:\\s-+setup\\)"       ; The optional "setup" attribute
            "\\)*"
            "\\s-*>\n")                     ; The end of the tag

@simon-edlund
Copy link

Can this be merged, @AdamNiederer ?

@akicho8
Copy link

akicho8 commented Sep 20, 2022

Is this project abandoned?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants