app/scripts/modules/codemirror/controller.js
File controller.js
has 393 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Copyright (C) 2015 Laverna project Authors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Function initEditor
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
initEditor: function() {
this.editor = CodeMirror.fromTextArea(document.getElementById('editor--input'), {
mode : {
name : 'gfm',
gitHubSpice : false
Function onScroll
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onScroll: _.debounce(function(e) {
// Don't do any computations
if (!e.doc.scrollTop) {
this.view.ui.previewScroll.scrollTop(0);
Function toggleBlock
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
toggleBlock: function(type) {
var stat = this.getState(),
start = this.editor.getCursor('start'),
end = this.editor.getCursor('end'),
text,