简体   繁体   English

我的 html 代码中的某些内容使用 Grunt htmlmin 给了我一个解析错误

[英]Something in my html code is giving me a Parse Error using Grunt htmlmin

I am getting a parse error when trying to use grunt htmlmin this happens when I run my grunt build when I run with a --force I get that 2 of the three pages return an error.尝试使用 grunt htmlmin 时出现解析错误,当我使用 --force 运行 grunt 构建时会发生这种情况,我得到三个页面中的 2 个返回错误。 I think there is something wrong with my HTML potentially where do I need to look?我认为我的 HTML 有问题,我可能需要看哪里?

Running "htmlmin:dist" (htmlmin) task
Warning: dist/index.html
Error: Parse Error: <form id="contact-form" method="post" action="https://formspree.io/xaywqrrw" method="POST" / role="form" data-toggle="validator">
                             <div class="form-group row">
                                 <label for="firstname" class="col-lg-2 col-form-label">First 

I think the issue is that slash "/" in the middle.我认为问题在于中间的斜线“/”。

method="POST" -------> / <------ role="form" data-toggle="validator"> method="POST" --------> / <----- role="form" data-toggle="validator">

It's supposed to be at the end of the tag or at the beginning only (for closing tags).它应该在标签的末尾或仅在开头(用于结束标签)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM