Skip to content
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

Next: Invalid attribute name: data-test, aria-labelledby #59

Closed
LeBenLeBen opened this issue Nov 13, 2020 · 6 comments
Closed

Next: Invalid attribute name: data-test, aria-labelledby #59

LeBenLeBen opened this issue Nov 13, 2020 · 6 comments

Comments

@LeBenLeBen
Copy link
Contributor

LeBenLeBen commented Nov 13, 2020

I’ve just updated to version 2.0.0-alpha.3 and I get errors on some attributes that shouldn’t probably throw.

[VueLive] Invalid attribute name: data-test
[VueLive] Invalid attribute name: aria-labelledby

When this happens, the code block display is weird as well, an element with the class `VueLive-squiggles-wrapper" seems to be creating some weird white space within the Prism editor.

Screenshot_2020-11-13 Chūshō Playground

@LeBenLeBen
Copy link
Contributor Author

This line seems to be the issue: https://github.com/vue-styleguidist/vue-live/blob/next/src/utils/checkTemplate.js#L52

The regex looks odd to me, especially the ,-, part since it means, I think, all characters between , and , which doesn’t really make sense?!

I’m not sure which characters are allowed in attributes but I guess , isn’t one of them whereas - is. I’d propose to adapt it to something like /^[a-z\-:]+$/g

WDYT?

elevatebart added a commit that referenced this issue Nov 13, 2020
@elevatebart
Copy link
Member

Thank you so much @LeBenLeBen ,

You were absolutely right. I added a couple of additional tests just so things happen smoothly.

@elevatebart
Copy link
Member

🎉 This issue has been resolved in version 2.0.0-alpha.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@LeBenLeBen
Copy link
Contributor Author

@elevatebart Thank you for fixing and releasing so quickly! 🙇

elevatebart added a commit that referenced this issue May 1, 2022
* fix: first compiling version

* fix: demo remove use of datepicker unused

* First release of a vue 3 compatible vue-live (#53)

* feat: new next configuration for sem rel

BREAKING CHANGE:  will deliver the next branch as alpha next

* fix: hook on the right event

* fix: use global h hyperscript

* fix: protect empty script

* fix: install vue-3 datepicker

* docs: use the new date picker

* docs: add a comment

* build: ren semantic on next

* build: run travis on next branch

* test: fix cypress

* fix: A bunch of fixes for the next branch (#55)

* refactor: abandon functional components

* fix: avoid warning of VueLiveDefaultLayout made reactive

* fix: prevent PrismEditor from inheriting Editor props

Otherwise the event onChange is triggered twice, once by PrismEditor textarea (payload: Event) and once by the Editor (payload: code string)

* fix: externalize Vue from library bundle

* docs: fix vue aliases

* docs: update path of vuejs

* Update README.md

* fix: use acorn walk instead of recast visit

For vite esm compat

* fix: remove recast remains

* style: update comment

* fix: allow aria and dashed attributes

closes #59

* test: update test to make colon acceptable

* fix: CSS scope ID (#64)

* chore: release alpha 6

* fix: ci update caniuse

* fix: allow for $ variables and functions handlers

* build: vue plugin before others for sfc

* fix: release semrel

* feat: create allow list for camelCased SVG attributes (#67)

Co-authored-by: Michael Dodge <michael.dodge@vivint.com>

* fix: make npm start work again

* fix: make it run without eslint errors

* fix: make it run

* fix: update dependency and make jsx work

* build: eslint configuration

* build: fix unit test using jest

* fix: update inbrowser compiler for vite compat

* fix: remove console.log

* ci: remove travis from vue-live

Co-authored-by: Benoît Burgener <benoit.burgener@gmail.com>
Co-authored-by: Maksym Shopynskyi <ardier16@gmail.com>
Co-authored-by: mgdodge <mgdodge@hotmail.com>
Co-authored-by: Michael Dodge <michael.dodge@vivint.com>
@github-actions
Copy link

github-actions bot commented May 2, 2022

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

github-actions bot commented Jun 2, 2022

🎉 This issue has been resolved in version 3.0.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

elevatebart added a commit that referenced this issue Jun 2, 2022
* fix: first compiling version

* fix: demo remove use of datepicker unused

* First release of a vue 3 compatible vue-live (#53)

* feat: new next configuration for sem rel

BREAKING CHANGE:  will deliver the next branch as alpha next

* fix: hook on the right event

* fix: use global h hyperscript

* fix: protect empty script

* fix: install vue-3 datepicker

* docs: use the new date picker

* docs: add a comment

* build: ren semantic on next

* build: run travis on next branch

* test: fix cypress

* fix: A bunch of fixes for the next branch (#55)

* refactor: abandon functional components

* fix: avoid warning of VueLiveDefaultLayout made reactive

* fix: prevent PrismEditor from inheriting Editor props

Otherwise the event onChange is triggered twice, once by PrismEditor textarea (payload: Event) and once by the Editor (payload: code string)

* fix: externalize Vue from library bundle

* docs: fix vue aliases

* docs: update path of vuejs

* Update README.md

* fix: use acorn walk instead of recast visit

For vite esm compat

* fix: remove recast remains

* style: update comment

* fix: allow aria and dashed attributes

closes #59

* test: update test to make colon acceptable

* fix: CSS scope ID (#64)

* chore: release alpha 6

* fix: ci update caniuse

* fix: allow for $ variables and functions handlers

* build: vue plugin before others for sfc

* fix: release semrel

* feat: create allow list for camelCased SVG attributes (#67)

Co-authored-by: Michael Dodge <michael.dodge@vivint.com>

* fix: make npm start work again

* fix: make it run without eslint errors

* fix: make it run

* fix: update dependency and make jsx work

* build: eslint configuration

* build: fix unit test using jest

* fix: update inbrowser compiler for vite compat

* fix: remove console.log

* fix: build script with vite needs ordering of imports

* ci: run release on next

Co-authored-by: Benoît Burgener <benoit.burgener@gmail.com>
Co-authored-by: Maksym Shopynskyi <ardier16@gmail.com>
Co-authored-by: mgdodge <mgdodge@hotmail.com>
Co-authored-by: Michael Dodge <michael.dodge@vivint.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants