GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): omit page-specific headers and footers from RTF text (#3… · pingdotgg/t3code@7b44788

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/server/src/provider
    • documentTextWorker.ts
    • userInputAttachments.test.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/server/src/provider/documentTextWorker.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/provider/documentTextWorker.ts
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,13 @@ function* rtf(source: string): Generator<string, void> {
454454
"object",
455455
"fldinst",
456456
"header",
457+
"headerf",
458+
"headerl",
459+
"headerr",
457460
"footer",
461+
"footerf",
462+
"footerl",
463+
"footerr",
458464
].includes(control)
459465
)
460466
state.skip = true;
Collapse file

‎apps/server/src/provider/userInputAttachments.test.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/provider/userInputAttachments.test.ts
+10-1Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,15 @@ describe("question answer paths", () => {
277277
);
278278

279279
it.effect.each([
280+
[
281+
"page-specific headers and footers",
282+
String.raw`{\rtf1\ansi\facingp\sectd\titlepg
283+
{\headerf First-page header}{\headerl Left-page header}{\headerr Right-page header}
284+
{\footerf First-page footer}{\footerl Left-page footer}{\footerr Right-page footer}
285+
\pard Approved delivery date: 24 November.\par
286+
}`,
287+
"Approved delivery date: 24 November.",
288+
],
280289
[
281290
"text symbols",
282291
String.raw`{\rtf1\ansi Pages 1\endash 5\emdash\lquote left\rquote\ldblquote right\rdblquote\bullet\b End\b0\unknown{\*\secret\bullet hidden}}`,
@@ -310,7 +319,7 @@ describe("question answer paths", () => {
310319
["large fallback", String.raw`{\rtf1\ansi\uc20\u945????????????????????Z}`, "αZ"],
311320
["no fallback", String.raw`{\rtf1\ansi\uc0\u945Z}`, "αZ"],
312321
["scoped count", String.raw`{\rtf1\ansi{\uc2\u945??}\u946?Z}`, "αβZ"],
313-
] as const)("extracts RTF symbols and Unicode fallbacks: %s", ([name, source, expected]) =>
322+
] as const)("extracts RTF text: %s", ([name, source, expected]) =>
314323
Effect.gen(function* () {
315324
const config = yield* ServerConfig.ServerConfig;
316325
const path = NodePath.join(config.attachmentsDir, `${name}.rtf`);

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.