Showing 44 of 97 total issues
File bootstrap.js
has 1517 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* ===================================================
* bootstrap-transition.js v2.3.2
* http://getbootstrap.com/2.3.2/javascript.html#transitions
* ===================================================
* Copyright 2013 Twitter, Inc.
File Markdown.Editor.js
has 1512 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// needs Markdown.Converter.js at the moment
(function () {
var util = {},
Function Converter
has 430 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Markdown.Converter = function () {
var pluginHooks = this.hooks = new HookCollection();
pluginHooks.addNoop("plainLinkText"); // given a URL that was encountered by itself (without markup), should return the link text that's to be given to this link
pluginHooks.addNoop("preConversion"); // called with the orignal text as given to makeHtml. The result of this plugin hook is the actual markdown source that will be cooked
pluginHooks.addNoop("postConversion"); // called with the final cooked HTML code. The result of this plugin hook is the actual output of makeHtml
Function UIManager
has 237 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function UIManager(postfix, panels, undoManager, previewManager, commandManager, helpOptions, getString) {
var inputBox = panels.input,
buttons = {}; // buttons.undo, buttons.link, etc. The actual DOM elements.
File Markdown.Converter.js
has 474 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var Markdown;
if (typeof exports === "object" && typeof require === "function") // we're in a CommonJS (e.g. Node.js) module
Markdown = exports;
else
Function UndoManager
has 171 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function UndoManager(callback, panels) {
var undoObj = this;
var undoStack = []; // A stack of undo states
var stackPtr = 0; // The index of the current state
Function PreviewManager
has 139 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function PreviewManager(converter, panels, previewRefreshCallback) {
var managerObj = this;
var timeout;
var elapsedTime;
Function tables
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Markdown.Extra.prototype.tables = function(text) {
// Whitelist used as a post-processing step after calling convert.makeHtml()
// to keep only span-level tags inside tables per the PHP Markdown Extra spec.
var whitelist = /^(<\/?(b|del|em|i|s|sup|sub|strong|strike)>|<(br)\s?\/?>)$/i;
var that = this;
Function prompt
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ui.prompt = function (text, defaultInputText, callback) {
// These variables need to be declared at this level since they are used
// in multiple functions.
var dialog; // The dialog box.
Function TextareaState
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function TextareaState(panels, isInitialState) {
// Aliases
var stateObj = this;
var inputArea = panels.input;
Function doBlockquote
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
commandProto.doBlockquote = function (chunk, postProcessing) {
chunk.selection = chunk.selection.replace(/^(\n*)([^\r]+?)(\n*)$/,
function (totalMatch, newlinesBefore, text, newlinesAfter) {
chunk.before += newlinesBefore;
Function makeSpritedButtonRow
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function makeSpritedButtonRow() {
var buttonBar = panels.buttonBar;
var normalYShift = "0px";
Function doList
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
commandProto.doList = function (chunk, postProcessing, isNumberedList) {
// These are identical except at the very beginning and end.
// Should probably use the regex extension function to make this clearer.
var previousItemsRegex = /(\n|^)(([ ]{0,3}([*+-]|\d+[.])[ \t]+.*)(\n.+|\n{2,}([*+-].*|\d+[.])[ \t]+.*|\n{2,}[ \t]+\S.*)*)\n*$/;
Function createDialog
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var createDialog = function () {
// The main dialog box.
dialog = doc.createElement("div");
dialog.className = "wmd-prompt-dialog";
Function doCode
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
commandProto.doCode = function (chunk, postProcessing) {
var hasTextBefore = /\S[ ]*$/.test(chunk.before);
var hasTextAfter = /^[ ]*\S/.test(chunk.after);
Function doLinkOrImage
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
commandProto.doLinkOrImage = function (chunk, postProcessing, isImage) {
chunk.trimWhitespace();
chunk.findTags(/\s*!?\[/, /\][ ]?(?:\n[ ]*)?(\[.*?\])?/);
var background;
Function slide
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, slide: function (type, next) {
var $active = this.$element.find('.item.active')
, $next = next || $active[type]()
, isCycling = this.interval
, direction = type == 'next' ? 'left' : 'right'
Function skipLines
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chunks.prototype.skipLines = function (nLinesBefore, nLinesAfter, findExtraNewlines) {
if (nLinesBefore === undefined) {
nLinesBefore = 1;
}
Function Editor
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Markdown.Editor = function (markdownConverter, idPostfix, options) {
options = options || {};
if (typeof options.handler === "function") { //backwards compatible behavior
Function show
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, show: function () {
var $tip
, pos
, actualWidth
, actualHeight