Much improved
This commit is contained in:
parent
d568cb993d
commit
6abd166d22
16
core/fse.js
16
core/fse.js
|
@ -23,7 +23,7 @@ const {
|
||||||
} = require('./string_util.js');
|
} = require('./string_util.js');
|
||||||
const {
|
const {
|
||||||
stripMciColorCodes,
|
stripMciColorCodes,
|
||||||
pipeToAnsi,
|
controlCodesToAnsi,
|
||||||
} = require('./color_codes.js');
|
} = require('./color_codes.js');
|
||||||
const Config = require('./config.js').get;
|
const Config = require('./config.js').get;
|
||||||
const { getAddressedToInfo } = require('./mail_util.js');
|
const { getAddressedToInfo } = require('./mail_util.js');
|
||||||
|
@ -459,9 +459,7 @@ exports.FullScreenEditorModule = exports.getModule = class FullScreenEditorModul
|
||||||
|
|
||||||
const QuoteRegex = /^ ([A-Za-z0-9]{1,2})>([ ]+)([^\r\n]*\r?\n)/gm;
|
const QuoteRegex = /^ ([A-Za-z0-9]{1,2})>([ ]+)([^\r\n]*\r?\n)/gm;
|
||||||
msg = msg.replace(QuoteRegex, (m, initials, spc, text) => {
|
msg = msg.replace(QuoteRegex, (m, initials, spc, text) => {
|
||||||
return pipeToAnsi(
|
return ` ${styleL1[0]}${initials}${styleL1[1]}>${spc}${styleL1[2]}${text}${bodyMessageView.styleSGR1}`;
|
||||||
` ${styleL1[0]}${initials}${styleL1[1]}>${spc}${styleL1[2]}${text}${bodyMessageView.styleSGR1}`
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -471,9 +469,7 @@ exports.FullScreenEditorModule = exports.getModule = class FullScreenEditorModul
|
||||||
|
|
||||||
const TearLineRegex = /^--- (.+)$(?![\s\S]*^--- .+$)/m;
|
const TearLineRegex = /^--- (.+)$(?![\s\S]*^--- .+$)/m;
|
||||||
msg = msg.replace(TearLineRegex, (m, text) => {
|
msg = msg.replace(TearLineRegex, (m, text) => {
|
||||||
return pipeToAnsi(
|
return `${style[0]}--- ${style[1]}${text}${bodyMessageView.styleSGR1}`;
|
||||||
`${style[0]}--- ${style[1]}${text}${bodyMessageView.styleSGR1}`
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -482,13 +478,11 @@ exports.FullScreenEditorModule = exports.getModule = class FullScreenEditorModul
|
||||||
|
|
||||||
const OriginRegex = /^([ ]{1,2})\* Origin: (.+)$/m;
|
const OriginRegex = /^([ ]{1,2})\* Origin: (.+)$/m;
|
||||||
msg = msg.replace(OriginRegex, (m, spc, text) => {
|
msg = msg.replace(OriginRegex, (m, spc, text) => {
|
||||||
return pipeToAnsi(
|
return `${spc}${style[0]}* ${style[1]}Origin: ${style[2]}${text}${bodyMessageView.styleSGR1}`;
|
||||||
`${spc}${style[0]}* ${style[1]}Origin: ${style[2]}${text}${bodyMessageView.styleSGR1}`
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
bodyMessageView.setText(msg);
|
bodyMessageView.setText(controlCodesToAnsi(msg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue