forked from phoedos/pmd
Merge branch 'pr-1275'
This commit is contained in:
@ -37,6 +37,7 @@ This is a minor release.
|
||||
* java-errorprone
|
||||
* [#1078](https://github.com/pmd/pmd/issues/1078): \[java] MissingSerialVersionUID rule does not seem to catch inherited classes
|
||||
* jsp
|
||||
* [#1274](https://github.com/pmd/pmd/issues/1274): \[jsp] Support EL in tag attributes
|
||||
* [#1276](https://github.com/pmd/pmd/issues/1276): \[jsp] add support for jspf and tag extensions
|
||||
* plsql
|
||||
* [#681](https://github.com/pmd/pmd/issues/681): \[plsql] Parse error with Cursor For Loop
|
||||
@ -49,4 +50,5 @@ This is a minor release.
|
||||
* [#1258](https://github.com/pmd/pmd/pull/1258): \[java] Use typeof in MissingSerialVersionUID - [krichter722](https://github.com/krichter722)
|
||||
* [#1264](https://github.com/pmd/pmd/pull/1264): \[cpp] Fix NullPointerException in CPPTokenizer:99 - [Rafael Cortês](https://github.com/mrfyda)
|
||||
* [#1277](https://github.com/pmd/pmd/pull/1277): \[jsp] #1276 add support for jspf and tag extensions - [Jordi Llach](https://github.com/jordillachmrf)
|
||||
* [#1275](https://github.com/pmd/pmd/pull/1275): \[jsp] Issue #1274 - Support EL in tag attributes - [Jordi Llach](https://github.com/jordillachmrf)
|
||||
* [#1278](https://github.com/pmd/pmd/pull/1278): \[ci] \[GSoC] Use pmdtester 1.0.0.pre.beta3 - [BBG](https://github.com/djydewang)
|
||||
|
@ -248,7 +248,7 @@ PARSER_END(JspParser)
|
||||
|
||||
<InTagState> TOKEN :
|
||||
{
|
||||
<ATTR_NAME: <IDENTIFIER> >
|
||||
<ATTR_NAME: (<IDENTIFIER> | "${" (<QUOTED_STRING> | <TEXT_IN_EL>)* "}") >
|
||||
| <TAG_END: ">" > : AfterTagState
|
||||
| <DECL_END: ("?>" | "!>") > : AfterTagState
|
||||
| <TAG_SLASHEND: "/>" > : AfterTagState
|
||||
|
@ -33,7 +33,21 @@ public class JspParserTest {
|
||||
"<span class=\"CostUnit\">$</span><span class=\"CostMain\">129</span><span class=\"CostFrac\">.00</span>");
|
||||
Assert.assertNotNull(node);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testParseELAttribute() {
|
||||
Node node = parse(
|
||||
"<div ${something ? 'class=\"red\"' : ''}> Div content here.</div>");
|
||||
Assert.assertNotNull(node);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testParseELAttributeValue() {
|
||||
Node node = parse(
|
||||
"<div class=\"${something == 0 ? 'zero_something' : something == 1 ? 'one_something' : 'other_something'}\">Div content here.</div>");
|
||||
Assert.assertNotNull(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies bug #311 Jsp parser fails on boolean attribute
|
||||
*/
|
||||
|
Reference in New Issue
Block a user