fix #636
This commit is contained in:
parent
dbc195d4ce
commit
92542e3ee4
|
@ -257,12 +257,12 @@ function splitChecksum(text) {
|
||||||
function dearmor(text) {
|
function dearmor(text) {
|
||||||
const reSplit = /^-----[^-]+-----$\n/m;
|
const reSplit = /^-----[^-]+-----$\n/m;
|
||||||
|
|
||||||
// remove trailing whitespace at end of line
|
// trim string and remove trailing whitespace at end of lines
|
||||||
text = text.replace(/[\t\r ]+\n/g, '\n');
|
text = text.trim().replace(/[\t\r ]+\n/g, '\n');
|
||||||
|
|
||||||
const type = getType(text);
|
const type = getType(text);
|
||||||
|
|
||||||
text = text.trim() + "\n";
|
text = text + "\n";
|
||||||
const splittext = text.split(reSplit);
|
const splittext = text.split(reSplit);
|
||||||
|
|
||||||
// IE has a bug in split with a re. If the pattern matches the beginning of the
|
// IE has a bug in split with a re. If the pattern matches the beginning of the
|
||||||
|
|
Loading…
Reference in New Issue
Block a user