Little vertical displacements (probably caused by empty alternative path) #16

Closed
Hermann-SW opened this Issue Sep 17, 2015 · 0 comments

Projects

None yet

1 participant

@Hermann-SW

Cool tool, but inside groups 1 and 3 there are little vertical displacements for this regexp (for xs:decimal):
http://regexper.com/#(%7C%5C-%7C%5C%2B)(%5Cd%2B(%5C.%5Cd*%7C)%7C%5C.%5Cd%2B)

Hermann.

@Hermann-SW Hermann-SW changed the title from Little vertical displacements (probable caused by empty alternative path) to Little vertical displacements (probably caused by empty alternative path) Sep 17, 2015
@javallone javallone added a commit that closed this issue Sep 17, 2015
@javallone Changing content used for empty match
When an empty expression is used in alternation with something else
(such as `(|test)`) the empty expression was using its empty group as a
placeholder element for calculating its anchor position. This
calculation was incorrect and was leading to the alternation not being
centered vertically. Using any element with height and width fixes this.

Fixes #16
0f36776
@javallone javallone closed this in 0f36776 Sep 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment