Showing 16 of 24 total issues
File markdown.js
has 999 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Released under MIT license
// Copyright (c) 2009-2010 Dominic Baggott
// Copyright (c) 2009-2010 Ash Berlin
// Copyright (c) 2011 Christoph Dorn <christoph@christophdorn.com> (http://www.christophdorn.com)
Function lists
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
lists: (function( ) {
// Use a closure to hide a few variables.
var any_list = "[*+-]|\\d+\\.",
bullet_list = /[*+-]/,
number_list = /\d+\./,
Function convert_tree_to_html
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function convert_tree_to_html( tree, references, options ) {
var i;
options = options || {};
// shallow clone
Function keyHandler
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function keyHandler(handleObj) {
if (typeof handleObj.data === "string") {
handleObj.data = {
keys: handleObj.data
};
Function link
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
"[": function link( text ) {
var orig = String(text);
// Inline content is possible inside `link text`
var res = Markdown.DialectHelpers.inline_until_char.call( this, text.substr(1), ']' );
Function InstantHotkeys
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function InstantHotkeys() {
var bindings = [];
function sc(element, index, array) {
return element.startsWith('hk-');
Function handler
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handleObj.handler = function(event) {
// Don't fire in text-accepting inputs that we didn't directly bind to
if (this !== event.target &&
(jQuery.hotkeys.options.filterInputAcceptingElements &&
jQuery.hotkeys.textInputTypes.test(event.target.nodeName) ||
Method retag
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def retag
encode = Encode.find(params[:id])
info = Tmdb::Movie.detail(params[:movie_id])
old_movie = Movie.find_by_id(encode.movie_id)
Function strong_em
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function strong_em( tag, md ) {
var state_slot = tag + "_state",
other_slot = tag == "strong" ? "em_state" : "strong_state";
Function block_meta
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Markdown.dialects.Maruku.block.block_meta = function block_meta( block, next ) {
// check if the last line of the block is an meta hash
var m = block.match( /(^|\n) {0,3}\{:\s*((?:\\\}|[^\}])*)\s*\}$/ );
if ( !m ) return undefined;
Function split_meta_hash
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function split_meta_hash( meta_string ) {
var meta = meta_string.split( "" ),
parts = [ "" ],
in_quotes = false;
Consider simplifying this complex logical expression. Open
Open
if (this !== event.target &&
(jQuery.hotkeys.options.filterInputAcceptingElements &&
jQuery.hotkeys.textInputTypes.test(event.target.nodeName) ||
(jQuery.hotkeys.options.filterContentEditable && jQuery(event.target).attr('contenteditable')) ||
(jQuery.hotkeys.options.filterTextInputs &&
Avoid deeply nested control flow statements. Open
Open
for (i = 0; i < stack.length; i++) {
if ( stack[ i ].indent != m[1] ) continue;
list = stack[ i ].list;
stack.splice( i+1 );
found = true;
Avoid deeply nested control flow statements. Open
Open
if ( --open_parens == 0) {
consumed -= url.length - len;
url = url.substring(0, len);
}
Avoid deeply nested control flow statements. Open
Open
if (!found) {
//print("not found. l:", uneval(l));
wanted_depth++;
if (wanted_depth <= stack.length) {
stack.splice(wanted_depth);
Avoid too many return
statements within this function. Open
Open
return [ 1, "[" ];