Skip to content

Commit

Permalink
Update dependencies and clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
runarberg committed Sep 2, 2015
1 parent f2cdd27 commit d0cb180
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 20 deletions.
21 changes: 9 additions & 12 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
},
"plugins": ["nodeca"],
"rules": {
"array-bracket-spacing": [ 2, "always" ],
"block-scoped-var": 2,
"brace-style": [ 2, '1tbs', { allowSingleLine: true } ],
"brace-style": [ 2, "1tbs", { allowSingleLine: true } ],
"comma-dangle": [ 2, "never" ],
"comma-spacing": 2,
"comma-style": 2,
"consistent-this": [ 2, self ],
Expand All @@ -27,7 +29,6 @@
"no-bitwise": 2,
"no-caller": 2,
"no-catch-shadow": 2,
"no-comma-dangle": 2,
"no-cond-assign": 2,
"no-console": 1,
"no-constant-condition": 2,
Expand All @@ -37,16 +38,16 @@
"no-dupe-keys": 2,
"no-div-regex": 2,
"no-empty": 2,
"no-empty-class": 2,
"no-empty-character-class": 2,
"no-empty-label": 2,
"no-else-return": 2,
"no-eq-null": 2,
"no-ex-assign": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-extra-boolean-cast": 2,
"no-extra-parens": 2,
"no-extra-semi": 2,
"no-extra-strict": 2,
"no-eval": 2,
"no-floating-decimal": 2,
"no-func-assign": 2,
Expand Down Expand Up @@ -75,13 +76,11 @@
"no-path-concat": 2,
"no-redeclare": 2,
"no-regex-spaces": 2,
"no-reserved-keys": 2,
"no-return-assign": 2,
"no-script-url": 2,
"no-sequences": 2,
"no-shadow": 2,
"no-shadow-restricted-names": 2,
"no-space-before-semi": 2,
"no-sparse-arrays": 2,
"no-trailing-spaces": 2,
"no-undef": 2,
Expand All @@ -92,21 +91,19 @@
"no-unused-vars": 2,
"no-use-before-define": 2,
"no-with": 2,
"no-wrap-func": 2,
"object-curly-spacing": [ 2, "always" ],
"quotes": [ 2, "single", "avoid-escape" ],
"radix": 2,
"semi": 2,
"semi-spacing": [ 2, { "before": false, "after": true } ],
"space-after-keywords": [ 2, "always" ],
"space-before-blocks": 2,
"space-in-brackets": [ 2, "always", {
"propertyName": false
} ],
"space-in-parens": [ 2, "never" ],
"space-infix-ops": 2,
"space-return-throw-case": 2,
"space-unary-ops": 2,
"spaced-line-comment": [ 2, "always", { "exceptions": [ "/" ] } ],
"strict": 2,
"spaced-comment": [ 2, "always", { "exceptions": [ "/" ] } ],
"strict": [ 2, "global" ],
"use-isnan": 2,
"yoda": 2,
"valid-typeof": 2,
Expand Down
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,13 @@ function makeMath_block(open, close) {
pos = state.skipSpaces(pos);

if (pos < max) { continue; }

haveEndMarker = true;
// found!
break;
}

// If math block has heading spaces, the should be removed from its inner block
// If math block has heading spaces, they should be removed from its inner block
len = state.tShift[startLine];

state.line = nextLine + (haveEndMarker ? 1 : 0);
Expand All @@ -183,7 +184,7 @@ function makeMath_block(open, close) {
function makeMathRenderer(options) {
var mathml = ascii2mathml(Object.assign({}, options));

return (options && options.display === 'block') ?
return options && options.display === 'block' ?
function(tokens, idx) {
return mathml(tokens[idx].content) + '\n';
} :
Expand Down
2 changes: 1 addition & 1 deletion lib/polyfills.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict';

/* Object.assign
*
Expand All @@ -14,7 +15,6 @@ if (!Object.assign) {
configurable: true,
writable: true,
value: function(target) {
'use strict';
if (typeof target === 'undefined' || target === null) {
throw new TypeError('Cannot convert first argument to object');
}
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"browserify": "(echo \"/*! ${npm_package_name} ${npm_package_version} ${npm_package_homepage} @license MIT */\"; browserify ./ -s markdownitMath) > dist/markdown-it-math.js",
"predist": "npm run test",
"dist": "rm -fr dist; mkdir dist; npm run browserify; npm run minify",
"lint": "eslint --reset index.js lib/",
"lint": "eslint index.js lib/",
"minify": "uglifyjs dist/markdown-it-math.js -b beautify=false,ascii-only=true -c -m --preamble \"/*! ${npm_package_name} ${npm_package_version} ${npm_package_homepage} @license MIT */\" > dist/markdown-it-math.min.js",
"prepublish": "npm run dist",
"pretest": "npm run lint",
Expand All @@ -34,12 +34,12 @@
},
"homepage": "https://github.com/runarberg/markdown-it-math",
"dependencies": {
"ascii2mathml": "^0.2.5"
"ascii2mathml": "^0.5.2"
},
"devDependencies": {
"babelify": "^5.0.4",
"browserify": "^9.0.4",
"eslint": "^0.18.0",
"babelify": "^6.3.0",
"browserify": "^11.0.1",
"eslint": "^1.3.1",
"eslint-plugin-nodeca": "^1.0.3",
"markdown-it": "^4.1.0",
"markdown-it-testgen": "^0.1.4",
Expand Down

0 comments on commit d0cb180

Please sign in to comment.