Skip to content

Commit

Permalink
Merge pull request #578 from Fdawgs/docs/readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Dec 2, 2021
2 parents cb01eaf + 993f9ad commit 0973010
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -33,8 +33,8 @@ Docsmith enables a data processor to use a robust, GDPR-compliant, open-source d
## Prerequisites

- [Node.js](https://nodejs.org/en/)
- Linux only: latest available `poppler-data` and `poppler-utils` binaries
- Linux and macOS only: latest available `unrtf` binary
- Linux only: latest available `poppler-data` and `poppler-utils` binaries (note: Docsmith has only been tested with `poppler-data` >= v0.4.9 and `poppler-utils` >= v20.12.0)
- Linux and macOS only: latest available `unrtf` binary (note: Docsmith has only been tested with `unrtf` >= v0.19.3)

## Setup

Expand Down
5 changes: 4 additions & 1 deletion src/plugins/rtf-to-txt/index.js
Expand Up @@ -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) {
/**
Expand Down
1 change: 1 addition & 0 deletions src/plugins/tidy-css/index.js
Expand Up @@ -73,6 +73,7 @@ async function plugin(server) {
fonts.forEach((font) => {
if (/[^a-zA-Z-]+/.test(font.trim())) {
parsedFonts.push(
// Stop escaping of <style> elements and code injection
cssEsc(font.replace(/<\/style>/gm, "").trim(), {
quotes: "double",
wrap: true,
Expand Down

0 comments on commit 0973010

Please sign in to comment.