bbottema/js-epub-maker

View on GitHub

Showing 31 of 47 total issues

Avoid deeply nested control flow statements.
Open

                            if (content[i] === ' ') {
                                first_attr = false;
                                break;
                            }
Severity: Major
Found in demo/js/vendor/beautify-html.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                } else if (tag_check.charAt(0) === '!') { //peek for <! comment
                    // for comments content is already correct.
                    if (!peek) {
                        this.tag_type = 'SINGLE';
                        this.traverse_whitespace();
    Severity: Major
    Found in demo/js/vendor/beautify-html.js - About 45 mins to fix

      Consider simplifying this complex logical expression.
      Open

                      if (content.length && content[content.length - 1] !== '=' && input_char !== '>' && space) {
                          //no space after = or before >
                          var wrapped = this.space_or_wrap(content);
                          var indentAttrs = wrapped && input_char !== '/' && !is_wrap_attributes_force;
                          space = false;
      Severity: Major
      Found in demo/js/vendor/beautify-html.js - About 40 mins to fix

        Function Section has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            EpubMaker.Section = function(epubType, id, content, includeInToc, includeInLandmarks) {
        Severity: Minor
        Found in src/js-epub-maker.js - About 35 mins to fix

          Function printer has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  this.printer = function(js_source, indent_character, indent_size, wrap_line_length, brace_style) { //handles input/output and some other printing functions
          Severity: Minor
          Found in demo/js/vendor/beautify-html.js - About 35 mins to fix

            Avoid too many return statements within this function.
            Open

                                return [token, tag_name_type];
            Severity: Major
            Found in demo/js/vendor/beautify-html.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
              Severity: Major
              Found in demo/js/vendor/beautify-html.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    if (code < 97) return code === 95;
                Severity: Major
                Found in demo/js/vendor/beautify-html.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                      return token;
                  Severity: Major
                  Found in demo/js/vendor/beautify-html.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
                    Severity: Major
                    Found in demo/js/vendor/beautify-html.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          if (code < 123) return true;
                      Severity: Major
                      Found in demo/js/vendor/beautify-html.js - About 30 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language