E
E
Extramezz2016-07-26 12:55:28
HTML
Extramezz, 2016-07-26 12:55:28

BEM and multiline comments?

Good afternoon!

<!--<a class="name name--mod" href="#">Ссылка</a>-->

The validator will swear at this code (and the browsers themselves will highlight in the "Source code"), because a bunch of "--" characters is not allowed inside html comments (because theoretically some browsers can take it for the end of a comment). But these symbols are part of BEM...
How to deal with it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Bowen, 2016-07-26
@Bowen

since theoretically some browsers may take it as the end of a comment)
Browsers use a regular expression (most likely) to define comments. There shouldn't be any problems. regexr.com/3dsjs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question