chore: update dev dependencies and fix code style

This commit is contained in:
Estevao Soares dos Santos 2022-02-23 05:04:55 +00:00
parent 6efd75cb83
commit d23b028bb3
13 changed files with 5688 additions and 995 deletions

View File

@ -64,8 +64,7 @@ module.exports = function (grunt) {
jshint: {
options: {
jshintrc: '.jshintrc',
reporterOutput: ''
jshintrc: '.jshintrc'
},
files: [
'Gruntfile.js',
@ -76,7 +75,7 @@ module.exports = function (grunt) {
eslint: {
options: {
config: '.eslintrc.json'
useEslintrc: true
},
target: [
'Gruntfile.js',

BIN
dist/showdown.js vendored

Binary file not shown.

BIN
dist/showdown.js.map vendored

Binary file not shown.

BIN
dist/showdown.min.js vendored

Binary file not shown.

Binary file not shown.

6648
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -47,12 +47,12 @@
"grunt": "^1.0.3",
"grunt-contrib-clean": "1.1.x",
"grunt-contrib-concat": "1.0.x",
"grunt-contrib-jshint": "1.1.x",
"grunt-contrib-jshint": "3.2.x",
"grunt-contrib-uglify": "~3.3.0",
"grunt-conventional-changelog": "6.1.x",
"grunt-conventional-github-releaser": "1.0.x",
"grunt-endline": "0.6.x",
"grunt-eslint": "19.0.x",
"grunt-eslint": "^24.0.0",
"grunt-simple-mocha": "0.4.x",
"load-grunt-tasks": "3.5.x",
"performance-now": "2.0.x",

View File

@ -45,7 +45,7 @@ showdown.Converter = function (converterOptions) {
*/
setConvFlavor = setFlavor,
/**
/**
* Metadata of the document
* @type {{parsed: {}, raw: string, format: string}}
*/
@ -107,7 +107,7 @@ showdown.Converter = function (converterOptions) {
'Please inform the developer that the extension should be updated!');
legacyExtensionLoading(showdown.extensions[ext], ext);
return;
// END LEGACY SUPPORT CODE
// END LEGACY SUPPORT CODE
} else if (!showdown.helper.isUndefined(extensions[ext])) {
ext = extensions[ext];

View File

@ -477,7 +477,7 @@ showdown.helper.Event = function (name, text, params) {
* POLYFILLS
*/
// use this instead of builtin is undefined for IE8 compatibility
if (typeof(console) === 'undefined') {
if (typeof (console) === 'undefined') {
console = {
warn: function (msg) {
'use strict';

View File

@ -28,7 +28,7 @@ showdown.subParser('makehtml.codeSpans', function (text, options, globals) {
text = globals.converter._dispatch('makehtml.codeSpans.before', text, options, globals).getText();
if (typeof(text) === 'undefined') {
if (typeof (text) === 'undefined') {
text = '';
}
text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,

View File

@ -70,7 +70,7 @@ showdown.subParser('makehtml.hashHTMLBlocks', function (text, options, globals)
//2. Split the text in that position
var subTexts = showdown.helper.splitAtIndex(text, opTagPos),
//3. Match recursively
//3. Match recursively
newSubText1 = showdown.helper.replaceRecursiveRegExp(subTexts[1], repFunc, patLeft, patRight, 'im');
// prevent an infinite loop

View File

@ -5,13 +5,13 @@ showdown.subParser('makehtml.headers', function (text, options, globals) {
var headerLevelStart = (isNaN(parseInt(options.headerLevelStart))) ? 1 : parseInt(options.headerLevelStart),
// Set text-style headers:
// Header 1
// ========
//
// Header 2
// --------
//
// Set text-style headers:
// Header 1
// ========
//
// Header 2
// --------
//
setextRegexH1 = (options.smoothLivePreview) ? /^(.+)[ \t]*\n={2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n=+[ \t]*\n+/gm,
setextRegexH2 = (options.smoothLivePreview) ? /^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n-+[ \t]*\n+/gm;

View File

@ -6,7 +6,7 @@ showdown.subParser('makehtml.tables', function (text, options, globals) {
}
var tableRgx = /^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,
//singeColTblRgx = /^ {0,3}\|.+\|\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n(?: {0,3}\|.+\|\n)+(?:\n\n|¨0)/gm;
//singeColTblRgx = /^ {0,3}\|.+\|\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n(?: {0,3}\|.+\|\n)+(?:\n\n|¨0)/gm;
singeColTblRgx = /^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm;
function parseStyles (sLine) {