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

yabwe / medium-editor / 3169
94%

Build:
DEFAULT BRANCH: master
Ran 08 Feb 2017 09:54PM UTC
Jobs 1
Files 21
Run time 2s
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
3169

Pull #1258

travis-ci

web-flow
Only add schemes to URLs with hostnames

Fixes: https://github.com/yabwe/medium-editor/issues/1250

This changes the way a scheme is prefixed to a URL when linkValidation
is on. Previously any URL that did not match the scheme regex would be
prefixed with 'http://' which meant that an absolute path such as '/'
would be changed to 'http:///'

This changes it so that the 'http://' is only prefixed if the first part
of the path looks like a hostname, which allows absolute paths to be
unchanged and most relative paths to be unchanged.

I say most as a path such as "test.txt" would be matched as a hostname and
converted to 'http://test.txt' but this seems an acceptable trade off
and definitely better than trying to store a list of valid TLDs so
filenames and hostnames can be determined.
Pull Request #1258: Only add schemes to URLs with hostnames

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

2388 of 2519 relevant lines covered (94.8%)

547.68 hits per line

Jobs
ID Job ID Ran Files Coverage
1 3169.1 08 Feb 2017 09:54PM UTC 0
94.8
Travis Job 3169.1
Source Files on build 3169
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #3169
  • Pull Request #1258
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc