Skip to content
Permalink
Browse files
refactor(plugins/rtf-to-txt): improve conciseness of regex
  • Loading branch information
Fdawgs committed Dec 2, 2021
1 parent 64fad0c commit 993f9ade7641958d43987aababab8589f18150ac
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/plugins/rtf-to-txt/index.js
@@ -86,7 +86,10 @@ async function plugin(server, options) {

// Remove metadata comments UnRTF adds to beginning of file
req.conversionResults.body = req.conversionResults.body
.replace(/^###(?:\s){0,3}.*?(?:-){1,17}/ms, "")
.replace(
/^###\s?Translation\s?from\s?RTF\s?performed\s?by\s?UnRTF.*?-{1,17}/ims,
""
)
.trim();
} catch (err) {
/**

0 comments on commit 993f9ad

Please sign in to comment.