Details
Description
The following test fails with MyFaces: https://github.com/jakartaee/faces/blob/master/tck/faces40/doctype/src/test/java/ee/jakarta/tck/faces/test/servlet50/doctype/Spec1568IT.java
org.junit.ComparisonFailure: Page is using HTML5 doctype expected:<<!DOCTYPE html[]>> but was:<<!DOCTYPE html[ ]>> org.junit.ComparisonFailure: Page is using XHTML4 transitional public doctype expected:<...l1-transitional.dtd"[]>> but was:<...l1-transitional.dtd"[ ]>> org.junit.ComparisonFailure: Page is using XHTML4 strict system doctype expected:<...D/xhtml1-strict.dtd"[]>> but was:<...D/xhtml1-strict.dtd"[ ]>>
There is an extra space before the closing of DOCTYPE:
<!DOCTYPE HTML > vs <!DOCTYPE HTML>
This is due to the following line of code: https://github.com/apache/myfaces/blob/main/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/DoctypeInstruction.java#L68