Issue #410: Some amendments in WritingJavadocCheck, HTML tags part
This commit is contained in:
parent
ae254f7949
commit
280b590ead
|
|
@ -53,10 +53,10 @@ public class MyClass {
|
|||
Checkstyle can not parse something that looks like an HTML, so limitation appear.
|
||||
</p>
|
||||
<p>
|
||||
The comment should be written in XHTML to build nested AST Tree that most Checks expect. This means that every HTML tag should have matching closed HTML tag or it is self-closed tag.
|
||||
The comment should be written in XHTML to build nested AST Tree that most Checks expect. This means that every HTML tag should have matching end HTML tag or it is a void tag.
|
||||
</p>
|
||||
<p>
|
||||
The only exceptions are HTML 4 tags that are "don't require closing" tag, so, Checkstyle won't show error about missing closing tag, however, it leads to broken XHTML structure and as result leads to
|
||||
The only exceptions are HTML 4 tags whose end tag is optional, so, Checkstyle won't show error about missing end tag, however, it leads to broken XHTML structure and as result leads to
|
||||
not-nested content of the HTML tags in Abstract Syntax Tree of the Javadoc comment.
|
||||
<br/>
|
||||
In other words if HTML tags are not closed Javadoc grammar cannot determine content of these tags,
|
||||
|
|
@ -267,14 +267,14 @@ class MyCheck extends AbstractJavadocCheck {
|
|||
Checkstyle supports HTML4 tags in Javadoc comments: <a href="https://www.w3.org/TR/html4/index/elements.html">all HTML4 elements</a>.
|
||||
</p>
|
||||
<p>
|
||||
HTML 4 is picked just to have a list of tags that are "don't require closing tag" and a list of tags whose end tag is forbidden (also known as <a href="http://www.w3schools.com/html/html_elements.asp">empty html tags</a>, for example <a href="https://www.w3.org/TR/html4/struct/text.html#edef-BR">BR tag</a>).
|
||||
HTML 4 is picked just to have a list of elements whose end tag is optional and a list of <a href="https://www.w3.org/TR/html-markup/syntax.html#void-element">void elements</a> (also known as <a href="http://www.w3schools.com/html/html_elements.asp">empty html tags</a>, for example <a href="https://www.w3.org/TR/html4/struct/text.html#edef-BR">BR tag</a>).
|
||||
</p>
|
||||
<p>
|
||||
HTML tags with "don't require closing tag" tag: <P>, <LI>, <TR>, <TD>, <TH>, <BODY>, <COLGROUP>, <DD>,
|
||||
HTML elements whose end tag is optional: <P>, <LI>, <TR>, <TD>, <TH>, <BODY>, <COLGROUP>, <DD>,
|
||||
<DT>, <HEAD>, <HTML>, <OPTION>, <TBODY>, <THEAD>, <TFOOT>.
|
||||
</p>
|
||||
<p>
|
||||
Empty HTML tags: <AREA>, <BASE>, <BASEFONT>, <BR>, <COL>, <FRAME>,
|
||||
Void HTML elements: <AREA>, <BASE>, <BASEFONT>, <BR>, <COL>, <FRAME>,
|
||||
<HR>, <IMG>, <INPUT>, <ISINDEX>, <LINK>, <META>, <PARAM>.
|
||||
</p>
|
||||
<p>
|
||||
|
|
|
|||
Loading…
Reference in New Issue