mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-08 20:23:39 +00:00
Rename prevLine to activeLine for better reading clarity.
This commit is contained in:
@@ -5,10 +5,10 @@ module.exports = {
|
|||||||
// BRACE FOLDING
|
// BRACE FOLDING
|
||||||
const startMatcher = /\{[ \t]*$/;
|
const startMatcher = /\{[ \t]*$/;
|
||||||
const endMatcher = /\}[ \t]*$/;
|
const endMatcher = /\}[ \t]*$/;
|
||||||
const prevLine = cm.getLine(start.line);
|
const activeLine = cm.getLine(start.line);
|
||||||
|
|
||||||
|
|
||||||
if(prevLine.match(startMatcher)) {
|
if(activeLine.match(startMatcher)) {
|
||||||
const lastLineNo = cm.lastLine();
|
const lastLineNo = cm.lastLine();
|
||||||
let end = start.line + 1;
|
let end = start.line + 1;
|
||||||
let braceCount = 1;
|
let braceCount = 1;
|
||||||
@@ -31,7 +31,7 @@ module.exports = {
|
|||||||
|
|
||||||
const importMatcher = /^@import.*?[;]/;
|
const importMatcher = /^@import.*?[;]/;
|
||||||
|
|
||||||
if(prevLine.match(importMatcher)) {
|
if(activeLine.match(importMatcher)) {
|
||||||
return {
|
return {
|
||||||
from : CodeMirror.Pos(start.line, 0),
|
from : CodeMirror.Pos(start.line, 0),
|
||||||
to : CodeMirror.Pos(start.line, cm.getLine(start.line).length)
|
to : CodeMirror.Pos(start.line, cm.getLine(start.line).length)
|
||||||
|
|||||||
Reference in New Issue
Block a user