Empty groups don't get highlighted
If groups have content, the content and the group brackets themselves are highlighted:
If the groups do not have content, the group is not correctly recognized and therefore not highlighted, which is a bug:
This is due to the fact that the content by the parser is empty on empty groups, although they should have at least the brackets as content.
Parser result without content.
----------------------- Engine: BRE RegEx: '()' text: '' no match found time: 1.526699997484684ms ----------------------- ### BRE ### content: '(', pos: 0, endPos: 0, type: CHAR content: ')', pos: 1, endPos: 1, type: CHAR content: '', pos: 2, endPos: 2, type: EOF ----------------------- ### ERE ### content: '(', pos: 0, endPos: 1, type: OPENPARENTHESES groupnumber: 0 content: ')', pos: 1, endPos: 1, type: CLOSEPARENTHESES content: '', pos: 2, endPos: 2, type: EOF ----------------------- ### BRE ### type: ROOTNODE pos: 0 range: {"_range":[{"from":"","to":""}]} type: MULTIPLESTATES pos: 0 range: {"_range":[{"from":"","to":""}]} minLenght: 2 content: () type: SINGLESTATE pos: 0 range: {"_range":[{"from":"(","to":"("}]} minLenght: 1 content: ( type: SINGLESTATE pos: 1 range: {"_range":[{"from":")","to":")"}]} minLenght: 1 content: ) ----------------------- ### ERE ### type: ROOTNODE pos: 0 range: {"_range":[{"from":"","to":""}]} type: GROUP pos: 0 range: {"_range":[{"from":"","to":""}]} minLenght: 0 content: name: undefined type: NONE pos: 1 range: {"_range":[{"from":"()","to":"()"}]} minLenght: 0 content: () -----------------------
Parser result without content.
----------------------- Engine: BRE RegEx: '(a)' text: '' no match found time: 1.436200000345707ms ----------------------- ### BRE ### content: '(', pos: 0, endPos: 0, type: CHAR content: 'a', pos: 1, endPos: 1, type: CHAR content: ')', pos: 2, endPos: 2, type: CHAR content: '', pos: 3, endPos: 3, type: EOF ----------------------- ### ERE ### content: '(', pos: 0, endPos: 2, type: OPENPARENTHESES groupnumber: 0 content: 'a', pos: 1, endPos: 1, type: CHAR content: ')', pos: 2, endPos: 2, type: CLOSEPARENTHESES content: '', pos: 3, endPos: 3, type: EOF ----------------------- ### BRE ### type: ROOTNODE pos: 0 range: {"_range":[{"from":"","to":""}]} type: MULTIPLESTATES pos: 0 range: {"_range":[{"from":"","to":""}]} minLenght: 3 content: (a) type: SINGLESTATE pos: 0 range: {"_range":[{"from":"(","to":"("}]} minLenght: 1 content: ( type: SINGLESTATE pos: 1 range: {"_range":[{"from":"a","to":"a"}]} minLenght: 1 content: a type: SINGLESTATE pos: 2 range: {"_range":[{"from":")","to":")"}]} minLenght: 1 content: ) ----------------------- ### ERE ### type: ROOTNODE pos: 0 range: {"_range":[{"from":"","to":""}]} type: GROUP pos: 0 range: {"_range":[{"from":"","to":""}]} minLenght: 1 content: (a) name: undefined type: SINGLESTATE pos: 1 range: {"_range":[{"from":"a","to":"a"}]} minLenght: 1 content: a -----------------------
Edited by Robin Freund