Skip to content

Commit 1223de5

Browse files
committed
fixed hyperlink
1 parent 59be955 commit 1223de5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

demos/modules/demo_table.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* AUTH: Brent Ely (https://github.com/gitbrent/)
44
* DESC: Common test/demo slides for all library features
55
* DEPS: Used by various demos (./demos/browser, ./demos/node, etc.)
6-
* VER.: 3.12.0
7-
* BLD.: 20230207
6+
* VER.: 4.0.1
7+
* BLD.: 20250530
88
*/
99

1010
import {
@@ -1090,7 +1090,7 @@ function genSlide11(pptx) {
10901090

10911091
const baseTabRows = [
10921092
[
1093-
{ text: "white color", options: { fill: { color: "6699CC" }, color: "FFFFFF" } },
1093+
{ text: "white color", options: { fill: { color: "6699CC" }, align: "left", color: "FFFFFF" } },
10941094
{ text: "yellow color", options: { fill: { color: "99AACC" }, color: "FFFFAA" } },
10951095
{ text: "hyperlink here", options: { fill: { color: "AACCFF" }, hyperlink: { slide: 1 } } },
10961096
]

src/gen-objects.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ function createHyperlinkRels(
11881188

11891189
textObjs.forEach((text: TextProps, idx: number) => {
11901190
// IMPORTANT: `options` are lost due to recursion/copy!
1191-
if (options && options[idx]) text.options = { ...text.options, ...options[idx] }
1191+
if (options && options[idx] && options[idx].hyperlink) text.options = { ...text.options, ...options[idx] }
11921192

11931193
// NOTE: `text` can be an array of other `text` objects (table cell word-level formatting), continue parsing using recursion
11941194
if (Array.isArray(text)) {

0 commit comments

Comments
 (0)