Description
the readme contains the following example, of how to customize aspects of a style:
StructuredText(markdown: content)
.textual.structuredTextStyle(.gitHub)
.textual.headingStyle(
CustomHeadingStyle()
)
(followed by a sample CustomHeadingStyle)
Issue: for some reason, this doesn't work at all. Textual seems to ignore any styles that are set after setting a structuredTextStyle.
i tested this with a custom headingStyle, a custom codeBlockStyle, and a custom tableStyle, and they all got ignored (as in, it never calls the style's makeBody(configuration:) function), unless the .textual.structuredTextStyle(...) call is removed.
interestingly, if i reverse the order in which the modifiers are called, and first set the custom heading/codeBlock styles, and only then set the overall structuredTextStyle, it seems to work
Checklist
Textual version information
0.3.1
Destination operating system
iOS 26
Xcode version information
26.3 (17C529)
Swift Compiler version information
swift-driver version: 1.127.15 Apple Swift version 6.2.4 (swiftlang-6.2.4.1.4 clang-1700.6.4.2)
Target: arm64-apple-macosx26.0
Description
the readme contains the following example, of how to customize aspects of a style:
(followed by a sample
CustomHeadingStyle)Issue: for some reason, this doesn't work at all. Textual seems to ignore any styles that are set after setting a
structuredTextStyle.i tested this with a custom
headingStyle, a customcodeBlockStyle, and a customtableStyle, and they all got ignored (as in, it never calls the style'smakeBody(configuration:)function), unless the.textual.structuredTextStyle(...)call is removed.interestingly, if i reverse the order in which the modifiers are called, and first set the custom heading/codeBlock styles, and only then set the overall structuredTextStyle, it seems to work
Checklist
mainbranch of this package.Textual version information
0.3.1
Destination operating system
iOS 26
Xcode version information
26.3 (17C529)
Swift Compiler version information