Open jamesmortensen opened 10 years ago
I think the deprecation of the <xmp>
tag makes the tag unique for Strapdown.js ... ∩(︶▽︶)∩
Except it doesn't make it unique. It simply leaves the library open to undefined behavior as described in the Stack Overflow link. If everyone decided to go out and make up their own tags, then the Internet would be a mess. There is nothing I see special or unique about Strapdown.js that isn't special or unique about some other library or tool that does use semantically correct markup.
If there is a good reason for this, it would be interesting to hear. I'm not against the idea of making up tags in practice, as long as it's not just because of ignorance of how HTML works.
For reference "undeprecating" the
Would a sensible way forward be to support a custom tag based on
as an alternate syntax?
Wouldn't it just work to use a div? I'm no html expert but it seems like that is what most libs do, no? Le 5 janv. 2016 7:35 PM, "tortoise74" notifications@github.com a écrit :
For reference "undeprecating" the
tag for the benefit of strapdown and others was rejected by w3 (in 2013) as wont fix. See https://www.w3.org/Bugs/Public/show_bug.cgi?id=12235#c15 Would a sensible way forward be to support a custom tag based on
as an alternate syntax?— Reply to this email directly or view it on GitHub https://github.com/arturadib/strapdown/issues/40#issuecomment-169178700.
It works with textarea right now
I know I'm late to the party but I would suggest using <script type="text/markdown">
as the container tag. This won't encode HTML entities and you won't have to set display:none;
styling on it as well.
That is what other libraries do which involve using different language, but I generally see that with scripting languages like Coffeescript or Brython, not markup languages.
That's a good point. Although it's not uncommon to see markup in text/x-template
tags for various template systems like Handlebars, Vue, etc. it's not the most semantic implementation I agree. The only other thing I could think of would be something like <template class="markdown">
.
<template>
is meant for HTML code that is not readily rendered by a client, but instead leaves it in the DOM for scripts to manipulate.
Since any content is allowed, it's an obvious candidate as an alternative to the deprecated <xmp>
tag.
I found this library to be very useful, and one of my colleagues used it to help us build API documentation that didn't require us to replace all of the
>
and<
with>
and<
. In fact, I see it as a competitor to static-site generator tools like Jekyll, Octopress, and DocPad. In fact, that's exactly what we did with our API documentation. we used Strapdown.js to create a static page.However, it recently came to my attention that
<xmp
has been deprecated since HTML3.2.Should you consider using a non-deprecated tag in this library, such as
<pre>
or<code>
as suggested by the Mozilla HTML documentation on XMP?