Skip to content

Commit 74fb0c6

Browse files
fix: Turtle.get_TextElement defaulting title ( re #285 )
1 parent b4d63c4 commit 74fb0c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Types/Turtle/get_TextElement.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ if ($this.fill -ne 'transparent') {
4242
}
4343

4444

45-
4645
# Text Attributes can exist in Attribute or SVGAttribute, as long as they are prefixed.
4746
$prefix = '^/?text/'
4847
foreach ($collection in 'Attribute','SVGAttribute') {
@@ -72,6 +71,9 @@ return [xml]@(
7271
if ($this.Title) {
7372
# embed it here (so that the text is accessible).
7473
"<title>$([Security.SecurityElement]::Escape($this.Title))</title>"
74+
} else {
75+
# otherwise, use the text as the title.
76+
"<title>$([Security.SecurityElement]::Escape($this.Text))</title>"
7577
}
7678

7779
# If there are any text animations, include them here.

0 commit comments

Comments
 (0)