Skip to content

fix errormarkerclass for nested array #102

Merged
merged 1 commit into from Jan 3, 2014

2 participants

@flisky
flisky commented Dec 31, 2013

No description provided.

@tidoust tidoust pushed a commit that referenced this pull request Jan 3, 2014
François Daoust Fine-tuned fix of errormarkerclass for nested arrays (#67 and #102)
Many thanks for the pull request, @flisky. The line you fixed was
indeed the line that caused problem. However, while the "g" flag is
indeed needed to support nested arrays, that was not enough to
produce the right output.

Typically, the goal is to generate something like "map[0][0].index"
from:
 "urn:uuid:a6d3a998-fb94-4acd-9986-d6d6a23e8eb3#/map/0/0/index"

The first two regular expressions turn the input into:
 "map.0.0.index"

Just adding the "g" flag to the final regular expression woud not
really change anything in most cases, leading to:
 "map[0].0.index"

The following "." should not have been part of the match, I added the
right lookahead pattern. That seems to work fine in the forms I tried.
43f0e6c
@tidoust tidoust merged commit 4004f14 into joshfire:master Jan 3, 2014
@flisky
flisky commented Jan 3, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.