Fixed the single hyphen issue. Tests passing. Implementation Ready.

This commit is contained in:
Jim Derry 2017-09-25 10:50:04 -04:00
parent 483e0fec9e
commit c74e47adbb

View file

@ -3052,7 +3052,7 @@ static Node* GetTokenFromStream( TidyDocImpl* doc, GetTokenMode mode )
c = TY_(ReadChar)(doc->docIn); c = TY_(ReadChar)(doc->docIn);
/* Fix hyphens at beginning of tag */ /* Fix hyphens at beginning of tag */
if ( c != '-' && fixComments && lexer->txtstart - lexer->txtend == 0 ) if ( c != '-' && fixComments && lexer->lexsize - lexer->txtstart == 1 )
{ {
lexer->lexbuf[lexer->lexsize - 1] = '='; lexer->lexbuf[lexer->lexsize - 1] = '=';
} }