• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nichtich / Pandoc-Elements / 244
90%

Build:
DEFAULT BRANCH: master
Ran 10 May 2018 06:57PM UTC
Jobs 7
Files 8
Run time 4min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
244

Pull #91

travis-ci

web-flow
Fix list index regex and _bad_pointer return value.

Metadata.pm: fix buggy list index match regex and
make sure _bad_pointer doesn't return an empty list.

The old regex for matching valid list indices -- `/^[1-9]*[0-9]$/ -- was buggy:
it rejected any indices containing non-final 0's, so it began to give false
negatives for 100-109 and similarly higher up. While it is perhaps unlikely
that there will be any lists that long in metadata those indices *are*
valid and should be accepted. The new regex is `/^[1-9][0-9]*$|^0$/`.
While it has lone zero in a separate branch it is reasonably fast because
the first branch will fail immediately on an initial 0 and the second
branch then tried immediately, failing if anything follows the 0.

In the course of fixing the above bug I noticed that _bad_pointer
returned nothing rather than an explicit undefined value in non-strict
mode, which led to wrong results when calling `value()` in list context,
since the return values for rejected pointers would just be missing.

I added tests for both thnese things to pointer.t
Pull Request #91: Json pointer Fix list index regex and _bad_pointer return value.

52 of 52 new or added lines in 1 file covered. (100.0%)

602 of 670 relevant lines covered (89.85%)

1276.23 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
100.0
lib/Pandoc/Metadata.pm

Uncovered Existing Lines

Lines Coverage ∆ File
1
100.0
lib/Pandoc/Metadata.pm
Jobs
ID Job ID Ran Files Coverage
1 244.1 10 May 2018 06:57PM UTC 0
89.66
Travis Job 244.1
2 244.2 10 May 2018 06:57PM UTC 0
89.66
Travis Job 244.2
3 244.3 10 May 2018 06:57PM UTC 0
89.66
Travis Job 244.3
4 244.4 10 May 2018 06:58PM UTC 0
89.74
Travis Job 244.4
5 244.5 10 May 2018 06:58PM UTC 0
89.76
Travis Job 244.5
6 244.6 10 May 2018 07:01PM UTC 0
89.76
Travis Job 244.6
7 244.7 10 May 2018 07:01PM UTC 0
89.6
Travis Job 244.7
Source Files on build 244
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #244
  • Pull Request #91
  • PR Base - master (#238)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc