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

Does not support custom elements #44

Open
danfma opened this issue Dec 23, 2015 · 2 comments
Open

Does not support custom elements #44

danfma opened this issue Dec 23, 2015 · 2 comments

Comments

@danfma
Copy link

danfma commented Dec 23, 2015

Hey,

I try to type 'ui-segment' + TAB, it does not generate the <ui-segment></ui-segment>. I think you should work like the VS Code, where in HTML editor, any TAB with something before is an element. ;)

@am11
Copy link
Contributor

am11 commented Dec 23, 2015

According to W3C Web Components specs (http://www.w3.org/TR/2013/WD-components-intro-20130606/#custom-element-section sec 5.1), the name of the custom element must have a hyphen.

any TAB with something before is an element

Based on the above distinction, I think we can scope this case as "TAB with some name containing hyphen before is a (custom) element". This way it will save us from dropping the standard HTML5 elements validation from zencoding.

@am11
Copy link
Contributor

am11 commented Dec 23, 2015

While we are at it, another improvement can be made in fuzzy search of standard tags. Currently we are checking the discrete names and aliases. For instance, only art and article form <article> tag, but not arti, artic or articl. We should have a least common pattern to identify the standard tag and then if(inputTagName.StartsWith("art", StringComparison.InvariantCultureIgnoreCase)) return new BlockHtmlControl("article");.

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

No branches or pull requests

2 participants