-
-
Notifications
You must be signed in to change notification settings - Fork 969
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
Avoiding invalid html #1342
Comments
@smmoosavi a short answer is "no". Custom elements are still editor's draft, so there's no official validator AFAIK.
It would be safe to change There's a way to mount them as normal tags: <div riot-tag="todo"></div> but, |
Some comparative information for later discussion:
Vue's way is not fit to Riot.js. Normalization like Angular would be nice. Thoughts? @rsbondi |
Ok. I can't find including custom tags implementation in codes. So I say my idea with jquery. (can you say where is implimentations?) In jquery if you replace contents of tag implementation with include statement it works correctly <item id="def">
<b>abc</b>
</item>
<div> <!-- usage -->
<item id="use1"></item>
<item id="use2"></item>
</div> and js do some things equal to: var $def = $('#def').contents();
$("#use1").replaceWith($def);
$("#use2").replaceWith($def); result: <div>
<b>abc</b>
<b>abc</b>
</div> |
@smmoosavi your example doesn't make sense for me... |
I don't see why you say vue's way is not fit for riot. Just this.root.removeAttribute('riot-tag') on mount event. You can also mix it in with a mixin. edit: and just for the root tag there's also the last two forms of riot.mount http://riotjs.com/api/#mount-tag |
@georgir You should not forget that all the riot tags get styled using |
Could we add support for a |
- Fix [riot#1325](riot/riot#1325) : Gulp + Browserify + Babelify + type="es6" error. - Fix [riot#1342](riot/riot#1342), [riot#1636](riot/riot#1636) and request from [dwyl/learn-riot#8](dwyl/learn-riot#8) : Server-Side Rendered Page Fails W3C Check. The new `data-is` attribute is used for scoped styles in addition to `riot-tag` (the later will be removed in compiler v3.x) - The keyword `defer` in `<script src=file>` avoids that the compiler loads the file, preserving the tag - Requested by [riot#1492](riot/riot#1492) : Stop script tags from being evaluated with serverside `riot.render`. It is removed in client-side compilation because browsers will not load scripts through innerHTML. - It has changed the character used to hide expressions during the compilation, maybe this fix [riot#1588](riot/riot#1588) : Syntax Error: Invalid character `\0129` (riot+compiler.min). - Removed the unused parameter with the compiled-time brackets from the call to `riot.tag2`. - Removed support for raw expressions. It is unlikely this feature will be implemented in v2.3.x - Update devDependencies.
fixed in riot@2.3.17 use the attribute |
- The parsers are moved to its own directory in the node version. The load is on first use. - Fix [riot#1325](riot/riot#1325) : Gulp + Browserify + Babelify + type="es6" error. - Fix [riot#1342](riot/riot#1342), [riot#1636](riot/riot#1636) and request from [dwyl/learn-riot#8](dwyl/learn-riot#8) : Server-Side Rendered Page Fails W3C Check. The new `data-is` attribute is used for scoped styles in addition to `riot-tag` (the later will be removed in compiler v3.x) - The keyword `defer` in `<script src=file>` avoids that the compiler loads the file, preserving the tag - Requested by [riot#1492](riot/riot#1492) : Stop script tags from being evaluated with serverside `riot.render`. It is removed in client-side compilation because browsers will not load scripts through innerHTML. - It has changed the character used to hide expressions during the compilation, maybe this fix [riot#1588](riot/riot#1588) : Syntax Error: Invalid character `\0129` (riot+compiler.min). - The option `debug` inserts newlines between the `riot.tag2` parameters and the call is prefixed with the source filename - Requested by [riot#1646](riot/riot#1646) : Split portions of generated html with newline instead of space - Removed the unused parameter with the compiled-time brackets from the call to `riot.tag2`. - Removed support for raw expressions. It is unlikely this feature will be implemented in v2.3.x - Updated the regex that is used to match tag names, more closer to the HTML5 specs. - Update devDependencies.
As I see, created htmls by riot is invalid (https://validator.w3.org/)
For example:
Can we include tags without invalid htmls or extraneous tags?
The text was updated successfully, but these errors were encountered: