This Question is Possibly Answered

1 "correct" answer available (4 pts) 1 "helpful" answer available (2 pts)
3 Replies Last post: Feb 14, 2013 4:17 PM by Alex Berezoutsky  
jbuedel  Novice 109 posts since
Mar 9, 2005
Currently Being Moderated

Feb 12, 2013 11:18 PM

HTML structured pattern should not match, but does.  Why?

I have coded a structured pattern that should be detecting <input/> elements with an id attribute but no name attribute.  All the details are in the image below.  There is a regex match on the attribute names that should not match if the 'name' attribute already exists.  However, it does not fail, but instead matches an element like <input id="foo" name="foo" style=""/>.  Also, it does not seem to matter if I toggle the regex between "should" and "should NOT".  It matches either way.

CopyIdToNameAttribute-StructuredPattern.png

 

Thanks,

Josh

Alex Berezoutsky JetBrains 449 posts since
Feb 18, 2011
Currently Being Moderated
Feb 13, 2013 5:40 PM in response to: jbuedel
Re: HTML structured pattern should not match, but does.  Why?

Hi Josh,

 

Could you please specify ReSharper version you are using?

 

Thanks!

Alex Berezoutsky JetBrains 449 posts since
Feb 18, 2011
Currently Being Moderated
Feb 14, 2013 4:17 PM in response to: jbuedel
Re: HTML structured pattern should not match, but does.  Why?

Hi,

 

I've checked that and confirmed it as a bug in ReSharper on SSR subsystem. It is now logged in YouTrack here for further fixing: http://youtrack.jetbrains.com/issue/RSRP-338717

 

Thank you for your report!

More Like This

  • Retrieving data ...