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): separate EPUB block quotes from adjacent text (#43156) · patroza/t3code@522b067

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
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,10 @@ function* paragraphs(node: XmlNode): Generator<TextPart, void> {
338338
if (level) yield `${"#".repeat(Math.min(6, level))} `;
339339
yield* text(child);
340340
yield "\n";
341+
} else if (child.name === "blockquote" && child.hasText) {
342+
yield LINE_START;
343+
yield* paragraphs(child);
344+
yield LINE_START;
341345
} else {
342346
if (["ol", "ul", "dl"].includes(child.name)) {
343347
if (!child.hasText) continue;
Collapse file

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

Copy file name to clipboardExpand all lines: apps/server/src/provider/userInputAttachments.test.ts
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ describe("question answer paths", () => {
672672
"book.opf":
673673
'<package><manifest><item id="chapter" href="chapter.xhtml" media-type="application/xhtml+xml"/></manifest><spine><itemref idref="chapter"/></spine></package>',
674674
"chapter.xhtml":
675-
'<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Guide</title></head><body><ol><li>Before boarding<div><ul><li>Check passports</li></ul></div></li></ol>Intro<ul><li>Read the checklist</li></ul><dl><dt>Visa</dt><dd>Requirements<ul><li>Photo</li></ul></dd></dl><div>Carry<dl><dt>Passport</dt><dd>Required</dd></dl></div><div>Leave <ul></ul>room</div><div>Keep <ul><li hidden="">Draft</li></ul>walking</div></body></html>',
675+
'<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Guide</title></head><body><ol><li>Before boarding<div><ul><li>Check passports</li></ul></div></li></ol>Intro<ul><li>Read the checklist</li></ul><dl><dt>Visa</dt><dd>Requirements<ul><li>Photo</li></ul></dd></dl><div>Carry<dl><dt>Passport</dt><dd>Required</dd></dl></div><div>Leave <ul></ul>room</div><div>Keep <ul><li hidden="">Draft</li></ul>walking</div><div>Safety note<blockquote>Check the gate.</blockquote>Continue to the terminal.</div><div>Keep some <blockquote></blockquote>space.</div></body></html>',
676676
},
677677
expected: [
678678
"Before boarding\nCheck passports",
@@ -681,6 +681,8 @@ describe("question answer paths", () => {
681681
"Carry\nPassport\nRequired",
682682
"Leave room",
683683
"Keep walking",
684+
"Safety note\nCheck the gate.\nContinue to the terminal.",
685+
"Keep some space.",
684686
],
685687
},
686688
{

0 commit comments

Comments
0 (0)
You are visitor 01402792 — 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.