JaxsonWang/WP-Editor.MD

View on GitHub

Showing 3,227 of 3,227 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

(function () {
var factory = function factory(exports) {
var treeProperties = {
textFilter: {label: "Text Filter (regex)", type: "text", val: "."},
fontSize: {
Severity: Major
Found in assets/Editormd/lib/mindMap.js and 1 other location - About 1 mo to fix
assets/MindMap/mindMap.js on lines 39..714

Identical blocks of code found in 2 locations. Consider refactoring.
Open

(function () {
var factory = function factory(exports) {
var treeProperties = {
textFilter: {label: "Text Filter (regex)", type: "text", val: "."},
fontSize: {
Severity: Major
Found in assets/MindMap/mindMap.js and 1 other location - About 1 mo to fix
assets/Editormd/lib/mindMap.js on lines 39..714

Similar blocks of code found in 2 locations. Consider refactoring.
Open

var Prism = (function (_self){
 
// Private helper vars
var lang = /\blang(?:uage)?-([\w-]+)\b/i;
var uniqueId = 0;
Severity: Major
Found in assets/Prism.js/components/prism-core.js and 1 other location - About 3 wks to fix
assets/Prism.js/prism.js on lines 20..617

Similar blocks of code found in 2 locations. Consider refactoring.
Open

var Prism = (function (_self){
 
// Private helper vars
var lang = /\blang(?:uage)?-([\w-]+)\b/i;
var uniqueId = 0;
Severity: Major
Found in assets/Prism.js/prism.js and 1 other location - About 3 wks to fix
assets/Prism.js/components/prism-core.js on lines 15..612

File codemirror.js has 7797 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
 
// This is CodeMirror (https://codemirror.net), a code editor
// implemented in JavaScript on top of the browser's DOM.
Severity: Major
Found in assets/CodeMirror/lib/codemirror.js - About 3 wks to fix

    Function Vim has 4496 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var Vim = function() {
    function enterVimMode(cm) {
    cm.setOption('disableInput', true);
    cm.setOption('showCursorWhenSelecting', false);
    CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"});
    Severity: Major
    Found in assets/CodeMirror/keymap/vim.js - About 3 wks to fix

      File vim.js has 4692 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      // CodeMirror, copyright (c) by Marijn Haverbeke and others
      // Distributed under an MIT license: https://codemirror.net/LICENSE
       
      /**
      * Supported keybindings:
      Severity: Major
      Found in assets/CodeMirror/keymap/vim.js - About 1 wk to fix

        File editormd.js has 3459 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /* global jQuery, Zepto, katex, CodeMirror, marked, toolbarIconHandlers, Prism, mermaid */
        // 在使用TypeScript重构该项目之前,暂时先不检查类型
        // @ts-nocheck
         
        import { tagFilter, tagEncode } from "./utils/utils";
        Severity: Major
        Found in assets/Editormd/src/editormd.js - About 1 wk to fix

          File mhchem.js has 2630 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          (function webpackUniversalModuleDefinition(root, factory) {
          if(typeof exports === 'object' && typeof module === 'object')
          module.exports = factory(require("katex"));
          else if(typeof define === 'function' && define.amd)
          define(["katex"], factory);
          Severity: Major
          Found in assets/KaTeX/contrib/mhchem.js - About 1 wk to fix

            Function Prism has a Cognitive Complexity of 259 (exceeds 5 allowed). Consider refactoring.
            Open

            var Prism = (function (_self){
             
            // Private helper vars
            var lang = /\blang(?:uage)?-([\w-]+)\b/i;
            var uniqueId = 0;
            Severity: Minor
            Found in assets/Prism.js/components/prism-core.js - About 5 days to fix

            Function Prism has a Cognitive Complexity of 259 (exceeds 5 allowed). Consider refactoring.
            Open

            var Prism = (function (_self){
             
            // Private helper vars
            var lang = /\blang(?:uage)?-([\w-]+)\b/i;
            var uniqueId = 0;
            Severity: Minor
            Found in assets/Prism.js/prism.js - About 5 days to fix

            Similar blocks of code found in 5 locations. Consider refactoring.
            Open

            return /******/ (function(modules) { // webpackBootstrap
            /******/ // The module cache
            /******/ var installedModules = {};
            /******/
            /******/ // The require function
            Severity: Major
            Found in assets/KaTeX/contrib/mathtex-script-type.js and 4 other locations - About 5 days to fix
            assets/KaTeX/contrib/auto-render.js on lines 11..338
            assets/KaTeX/contrib/copy-tex.js on lines 11..212
            assets/KaTeX/contrib/mhchem.js on lines 11..3240
            assets/KaTeX/contrib/render-a11y-string.js on lines 11..857

            Similar blocks of code found in 5 locations. Consider refactoring.
            Open

            return /******/ (function(modules) { // webpackBootstrap
            /******/ // The module cache
            /******/ var installedModules = {};
            /******/
            /******/ // The require function
            Severity: Major
            Found in assets/KaTeX/contrib/render-a11y-string.js and 4 other locations - About 5 days to fix
            assets/KaTeX/contrib/auto-render.js on lines 11..338
            assets/KaTeX/contrib/copy-tex.js on lines 11..212
            assets/KaTeX/contrib/mathtex-script-type.js on lines 11..136
            assets/KaTeX/contrib/mhchem.js on lines 11..3240

            Similar blocks of code found in 5 locations. Consider refactoring.
            Open

            return /******/ (function(modules) { // webpackBootstrap
            /******/ // The module cache
            /******/ var installedModules = {};
            /******/
            /******/ // The require function
            Severity: Major
            Found in assets/KaTeX/contrib/copy-tex.js and 4 other locations - About 5 days to fix
            assets/KaTeX/contrib/auto-render.js on lines 11..338
            assets/KaTeX/contrib/mathtex-script-type.js on lines 11..136
            assets/KaTeX/contrib/mhchem.js on lines 11..3240
            assets/KaTeX/contrib/render-a11y-string.js on lines 11..857

            Similar blocks of code found in 5 locations. Consider refactoring.
            Open

            return /******/ (function(modules) { // webpackBootstrap
            /******/ // The module cache
            /******/ var installedModules = {};
            /******/
            /******/ // The require function
            Severity: Major
            Found in assets/KaTeX/contrib/mhchem.js and 4 other locations - About 5 days to fix
            assets/KaTeX/contrib/auto-render.js on lines 11..338
            assets/KaTeX/contrib/copy-tex.js on lines 11..212
            assets/KaTeX/contrib/mathtex-script-type.js on lines 11..136
            assets/KaTeX/contrib/render-a11y-string.js on lines 11..857

            Similar blocks of code found in 5 locations. Consider refactoring.
            Open

            return /******/ (function(modules) { // webpackBootstrap
            /******/ // The module cache
            /******/ var installedModules = {};
            /******/
            /******/ // The require function
            Severity: Major
            Found in assets/KaTeX/contrib/auto-render.js and 4 other locations - About 5 days to fix
            assets/KaTeX/contrib/copy-tex.js on lines 11..212
            assets/KaTeX/contrib/mathtex-script-type.js on lines 11..136
            assets/KaTeX/contrib/mhchem.js on lines 11..3240
            assets/KaTeX/contrib/render-a11y-string.js on lines 11..857

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

            function tokenBase (stream, state) {
            var ch = stream.peek();
             
            //Comment
            if (state.incomment) {
            Severity: Major
            Found in assets/CodeMirror/mode/jinja2/jinja2.js and 1 other location - About 4 days to fix
            assets/CodeMirror/mode/twig/twig.js on lines 24..119

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

            function tokenBase (stream, state) {
            var ch = stream.peek();
             
            //Comment
            if (state.incomment) {
            Severity: Major
            Found in assets/CodeMirror/mode/twig/twig.js and 1 other location - About 4 days to fix
            assets/CodeMirror/mode/jinja2/jinja2.js on lines 36..131

            Function TurndownService has a Cognitive Complexity of 201 (exceeds 5 allowed). Consider refactoring.
            Open

            var TurndownService = (function () {
            'use strict';
             
            function extend (destination) {
            for (var i = 1; i < arguments.length; i++) {
            Severity: Minor
            Found in assets/Turndown/turndown.js - About 4 days to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            (function () {
            if (typeof self === 'undefined' || !self.Prism || !self.document || !document.querySelector) {
            return;
            }
             
             
            Severity: Major
            Found in assets/Prism.js/prism.js and 1 other location - About 3 days to fix
            assets/Prism.js/plugins/file-highlight/prism-file-highlight.js on lines 1..89
            Severity
            Category
            Status
            Source
            Language