First draft of change to allow dotted attributes in Visualforce

This commit is contained in:
rmohan 2020-09-18 13:45:43 -07:00
parent 3ce68f4977
commit 5ea116fa52
No known key found for this signature in database
GPG Key ID: E575B05EA4F656EC
2 changed files with 7 additions and 1 deletions

View File

@ -67,6 +67,7 @@ PARSER_END(VfParser)
| <#ALPHANUM_CHAR: ( <ALPHA_CHAR> | <NUM_CHAR> ) >
| <#IDENTIFIER_CHAR: ( <ALPHANUM_CHAR> | [ "_", "-", ":" ] ) >
| <#IDENTIFIER: <ALPHA_CHAR> (<IDENTIFIER_CHAR>)* >
| <#IDENTIFIER_DOTTED: <IDENTIFIER> (<DOT> <IDENTIFIER>)* >
| <#XMLNAME: (<ALPHA_CHAR> | "_" | ":") (<IDENTIFIER_CHAR>)* >
| <#QUOTED_STRING_NO_BREAKS: ( "'" ( ~["'", "\r", "\n"] )* "'" )
| ( "\"" ( ~["\"", "\r", "\n"] )* "\"" ) >
@ -216,7 +217,7 @@ PARSER_END(VfParser)
<InTagState> TOKEN :
{
<ATTR_NAME: <IDENTIFIER> >
<ATTR_NAME: <IDENTIFIER_DOTTED> >
| <TAG_END: ">" > : AfterTagState
| <DECL_END: ("?>" | "!>") > : AfterTagState
| <TAG_SLASHEND: ("/>" | "/ >") > : AfterTagState

View File

@ -26,4 +26,9 @@ public class VfParserTest extends AbstractVfNodesTest {
vf.parse("<span escape='false' attrib=\"{!call}\">${\"yes\"}</span>");
}
@Test
public void testAttributeNameWithDot() {
vf.parse("<table-row keep-together.within-page=\"always\" >");
}
}