Add a ul > li in index.vue (with the basic start kit)
<template>
<section class="container">
<div>
<app-logo/>
<h1 class="title">
test
</h1>
<h2 class="subtitle">
Nuxt.js project
</h2>
<div class="links">
<a
href="https://nuxtjs.org/"
target="_blank"
class="button--green">Documentation</a>
<a
href="https://github.com/nuxt/nuxt.js"
target="_blank"
class="button--grey">GitHub</a>
<ul>
<li>
Documentation
</li>
<li>Github</li>
</ul>
</div>
</div>
</section>
</template>
When npm run generate is executed, the output in dist folder looks like,
<div class="links">
<a class="button--green" href="https://nuxtjs.org/" target="_blank">Documentation</a>
<a class="button--grey" href="https://github.com/nuxt/nuxt.js" target="_blank">GitHub</a>
<ul>
<li>Documentation
<li>Github</ul>
</div>
Tags should close correctly
Tags isn't closing properly
Issue observed only with ul > li for now. Not sure how I can provide a reproduction link for a nuxt generate example - apologies in advance.
Can reproduce this with latest nuxt-edge
It's the behavior from options removeOptionalTags of HTML minifier.
Per HTML W3C specification:
An li element鈥檚 end tag may be omitted if the li element is immediately followed by another li element or if there is no more content in the parent element.
You can try in HTML minifier site
Input:
<!DOCTYPE html>
<html>
<head>
<title>Minify Test</title>
</head>
<body>
<div class="main">
<ul>
<li>demo</li>
<li>Design from</li>
</ul>
</div>
</body>
</html>
Output:
<!doctype html><title>Minify Test</title><div class=main><ul><li>demo<li>Design from</ul></div>
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
It's the behavior from options
removeOptionalTagsofHTML minifier.Per HTML W3C specification:
You can try in HTML minifier site
Input:
Output: