Skip to content

Commit

Permalink
polyfill trim-right for older browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
notslang committed Apr 1, 2016
1 parent 956ba4c commit 5451de6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/index.js
Expand Up @@ -12,7 +12,12 @@ var ParserInline = require('./parser_inline');
var LinkifyIt = require('linkify-it');
var mdurl = require('mdurl');
var punycode = require('punycode');
var trimRight = require('trim-right');

if (!String.prototype.trimRight) {
/*eslint-disable no-extend-native*/
String.prototype.trimRight = function () { return trimRight(this); };
}

var config = {
'default': require('./presets/default'),
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -29,6 +29,7 @@
"entities": "~1.1.1",
"linkify-it": "~1.2.0",
"mdurl": "~1.0.1",
"trim-right": "^1.0.1",
"uc.micro": "^1.0.0"
},
"devDependencies": {
Expand Down

0 comments on commit 5451de6

Please sign in to comment.