0591. Tag Validator
Description
**Input:** code = "<DIV>This is the first line <![CDATA[<div>]]></DIV>"
**Output:** true
**Explanation:**
The code is wrapped in a closed tag : <DIV> and </DIV>.
The TAG\_NAME is valid, the TAG\_CONTENT consists of some characters and cdata.
Although CDATA\_CONTENT has an unmatched start tag with invalid TAG\_NAME, it should be considered as plain text, not parsed as a tag.
So TAG\_CONTENT is valid, and then the code is valid. Thus return true.ac
Last updated