Showing 44 of 97 total issues
Function balanceTags
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function balanceTags(html) {
if (html == "")
return "";
Function makeTables
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function makeTables(text) {
var blockdata;
while ((blockdata = findNextBlock(text)) !== null) {
var block = blockdata.block,
bounds = blockdata.bounds,
Function addLinkDef
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
commandProto.addLinkDef = function (chunk, linkDef) {
var refNumber = 0; // The current reference number
var defsToAdd = {}; //
// Start with a clean slate by removing all previous link definitions.
Function setupButton
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setupButton(button, isEnabled) {
var normalYShift = "0px";
var disabledYShift = "-20px";
var highlightYShift = "-40px";
Function writeAnchorTag
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function writeAnchorTag(wholeMatch, m1, m2, m3, m4, m5, m6, m7) {
if (m7 == undefined) m7 = "";
var whole_match = m1;
var link_text = m2.replace(/:\/\//g, "~P"); // to prevent auto-linking withing the link. will be converted back after the auto-linker runs
var link_id = m3.toLowerCase();
Function doHeading
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
commandProto.doHeading = function (chunk, postProcessing) {
// Remove leading/trailing whitespace and reduce internal spaces to single spaces.
chunk.selection = chunk.selection.replace(/\s+/g, " ");
chunk.selection = chunk.selection.replace(/(^\s+|\s+$)/g, "");
Function _FormParagraphs
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _FormParagraphs(text, doNotUnhash) {
//
// Params:
// $text - string to process with html <p> tags
//
Function applyPlacement
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, applyPlacement: function(offset, placement){
var $tip = this.tip()
, width = $tip[0].offsetWidth
, height = $tip[0].offsetHeight
, actualWidth
Function init
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Markdown.Extra.init = function(converter, options) {
// Each call to init creates a new instance of Markdown.Extra so it's
// safe to have multiple converters on a single page
var extra = new Markdown.Extra();
Function setInputAreaSelectionStartEnd
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.setInputAreaSelectionStartEnd = function () {
if (!panels.ieCachedRange && (inputArea.selectionStart || inputArea.selectionStart === 0)) {
stateObj.start = inputArea.selectionStart;
Function Autocomplete
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.Indextank.Autocomplete = function(el, options){
// To avoid scope issues, use 'base' instead of 'this'
// to reference this class from internal events and functions.
var base = this;
Function doAutoindent
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
commandProto.doAutoindent = function (chunk, postProcessing) {
var commandMgr = this,
fakeSelection = false;
Function findTags
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chunks.prototype.findTags = function (startRegex, endRegex) {
var chunkObj = this;
var regex;
Function writeImageTag
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function writeImageTag(wholeMatch, m1, m2, m3, m4, m5, m6, m7) {
var whole_match = m1;
var alt_text = m2;
var link_id = m3.toLowerCase();
var url = m4;
Function handleCtrlYZ
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var handleCtrlYZ = function (event) {
var handled = false;
if (event.ctrlKey || event.metaKey) {
Function getPageSize
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
position.getPageSize = function () {
var scrollWidth, scrollHeight;
var innerWidth, innerHeight;
Function fencedCodeBlocks
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Markdown.Extra.prototype.fencedCodeBlocks = function(text) {
function encodeCode(code) {
code = code.replace(/&/g, "&");
code = code.replace(/</g, "<");
code = code.replace(/>/g, ">");
Function doClick
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function doClick(button) {
inputBox.focus();
if (button.textOp) {
Function keydown
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, keydown: function (e) {
var $this
, $items
, $active
, $parent
Function _ProcessListItems
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _ProcessListItems(list_str, list_type) {
//
// Process the contents of a single ordered or unordered list, splitting it
// into individual list items.
//