swift-book icon indicating copy to clipboard operation
swift-book copied to clipboard

Improve the presentation of syntax outlines

Open krilnon opened this issue 2 years ago • 1 comments

When introducing new syntax for the first time, the book uses placeholder literals to show the customizable portion(s) of the syntax being introduced. Right now, these render as regular Swift code blocks that don't have a special treatment for placeholders.

rdar://64038462

krilnon avatar Aug 24 '22 21:08 krilnon

For example, here's the syntax outline used to illustrate the syntax of a for loop:

for <#item#> in <#collection#> {
   <#statements#>
}

The current TSPL pipeline styles them as blue bubbles, borrowing from the Xcode styling for placeholder tokens:

image

amartini51 avatar Aug 24 '22 21:08 amartini51