Closed RokeJulianLockhart closed 1 day ago
Please justify the use case and why this should be supported
https://github.com/microsoft/vscode/issues/216834#issuecomment-2187144310
@mjbvz:
<docType>
should be used in a Markdown document containing HTML.This doesn't answer my question: why do you need to write a docType tag at all? The resulting html isn't valid
https://github.com/microsoft/vscode/issues/216834#issuecomment-2187461867
@mjbvz, if targeting HTML5, it should be if you don't use a YAML preamble, since the <docType>
is first. To my knowledge, as long as a Document Type (before anything else) then <head>
and <body>
tag are present with character set defined, it's valid. All else is considered "unformatted" by the browser, so it decides the tag to utilize in its renderer, but remains valid.
The markdown is rendered to an html fragment that is then included on an html page. This means you're going to end up with:
<!DOCTYPE html>
<html lang="en">
<head>
<!-- ... -->
</head>
<body>
<!-- ... -->
<!-- Begin VS Code markdown content -->
<!DOCTYPE markdown>
<!-- Actual rendered MD .... -->
</body>
</html>
We don't render the markdown to a complete html file (we don't even have built-in support for preamble's). We target the most common case for markdown
If you a more specialized use case, you'll need to write tooling to support that. Closing this issue because it's out of scope of our builtin markdown support
https://github.com/microsoft/vscode/issues/216834#issuecomment-2207470800
@mjbvz, makes sense. Does seem like there's something wrong with your parser if, for this specific tag, it only accepts it if solely the first letter is upper case. If it needed to be upper case, surely the entire tag would need be, not just the first letter.
code-insiders-1.91.0-1718942998.el8.rpm
cpe:/o:fedoraproject:fedora:40
Steps to Reproduce
I use camelCase for all HTML tags, so I noticed this when I entered
<!docType Markdown>
.Solely the first letter matters, which doesn't make any sense - if it should always be capitalized, then the check should validate the entire tag content.