Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Rewrite custom element #84

Merged
merged 4 commits into from
Sep 2, 2016
Merged

Rewrite custom element #84

merged 4 commits into from
Sep 2, 2016

Conversation

hediyi
Copy link
Contributor

@hediyi hediyi commented Aug 31, 2016

@hansottowirtz hasn't been responsive on #64 for quite a while, so I decided to take over.

Selectors should be picked up regardless of whether a declaration block
is present.

The "it does not confuse custom elements with properties" test can be
delegated to another suite so we don't need this dedicated spec.
https://www.w3.org/TR/custom-elements/#valid-custom-element-name

* They start with a lowercase ASCII letter, ensuring that the HTML
  parser will treat them as tags instead of as text.
* They do not contain any uppercase ASCII letters, ensuring that the
  user agent can always treat HTML elements ASCII-case-insensitively.
* They contain a hyphen, used for namespacing and to ensure forward
  compatibility (since no elements will be added to HTML, SVG, or
  MathML with hyphen-containing local names in the future).
@hediyi
Copy link
Contributor Author

hediyi commented Sep 1, 2016

Ready to 🚀

@@ -671,6 +667,10 @@
'match': '(?i)(\\[)\\s*(-?[_a-z\\\\[[:^ascii:]]][_a-z0-9\\-\\\\[[:^ascii:]]]*)(?:\\s*([~|^$*]?=)\\s*(?:(-?[_a-z\\\\[[:^ascii:]]][_a-z0-9\\-\\\\[[:^ascii:]]]*)|((?>([\'"])(?:[^\\\\]|\\\\.)*?(\\6)))))?\\s*(\\])'
'name': 'meta.attribute-selector.css'
}
{
'match': '(?<![\\w-])[a-z][\\w&&[^A-Z]]*+-[\\w-&&[^A-Z]]++'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the possessive matching at the end?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 good point

@winstliu winstliu merged commit 979ef0e into atom:master Sep 2, 2016
@hediyi hediyi deleted the rewrite-custom-element branch September 2, 2016 01:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants