1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-11-05 01:56:21 +00:00

fix: correctly replace frozen fields in JRS-themed resumes

This commit is contained in:
hacksalot 2018-02-03 16:15:17 -05:00
parent 02f0af1ff8
commit 00067d012a
No known key found for this signature in database
GPG Key ID: 2F343EC247CA4B06
2 changed files with 4 additions and 4 deletions

View File

@ -46,8 +46,8 @@ Definition of the JRSGenerator class.
turnoff.forEach(function(c, idx) {
return console[c] = org[idx];
});
return rezHtml = rezHtml.replace(/@@@@~.*?~@@@@/gm, function(val) {
return MDIN(val.replace(/~@@@@/gm, '').replace(/@@@@~/gm, ''));
return rezHtml = rezHtml.replace(/@@@@~[\s\S]*?~@@@@/g, function(val) {
return MDIN(val.replace(/~@@@@/g, '').replace(/@@@@~/g, ''));
});
}
};

View File

@ -37,8 +37,8 @@ JRSGenerator = module.exports =
turnoff.forEach (c, idx) -> console[c] = org[idx]
# Unfreeze and apply Markdown
rezHtml = rezHtml.replace /@@@@~.*?~@@@@/gm, (val) ->
MDIN( val.replace( /~@@@@/gm,'' ).replace( /@@@@~/gm,'' ) )
rezHtml = rezHtml.replace /@@@@~[\s\S]*?~@@@@/g, (val) ->
MDIN( val.replace( /~@@@@/g,'' ).replace( /@@@@~/g,'' ) )
MDIN = (txt) -> # TODO: Move this