Skip to content

Text inside Time renders <text> #33

@mynona

Description

@mynona

This code

Time {
                    Text("\(publishingDate)")
                    if let lastUpdate = formatAsDate(
                        data.lastUpdateDate,
                        style: .DATE_MEDIUM_WITH_TIME_SHORT
                    ) {
                        Text(" – Updated: ")
                        Text(lastUpdate)
                    }
                }
                .dateTime(publishingDateIso)
                .class("flex-1 align-middle ")

produces

            <time datetime="2026-05-10T20:16:07.448+02:00" class="flex-1 align-middle ">
                <text>
                    May 10, 2026
                </text>
                <text>
                     – Updated: 
                </text>
                <text>
                    May 10, 2026 20:16 GMT+2
                </text>
            </time>

In the previous library text worked in time as in P. It just created the plain text and did not create < text > wrappers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions