This repository was archived by the owner on Jun 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Sources/swift-doc/Supporting Types Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3333 #130 by @mattt .
3434- Fixed file and directory unexpected permissions.
3535 #146 by @niw .
36+ - Fixed rendering of colon sequences in function signatures
37+ as emoji shortcodes (e.g. ` :on: ` → 🔛).
38+ #149 by @mattt .
3639- Fixed declarations for properties without explicit type annotations.
3740 #150 by @mattt .
3841
Original file line number Diff line number Diff line change @@ -24,7 +24,13 @@ extension Page {
2424 let data : Data ?
2525 switch format {
2626 case . commonmark:
27- data = document. render ( format: . commonmark) . data ( using: . utf8)
27+ var text = document. render ( format: . commonmark)
28+ // Insert U+200B ZERO WIDTH SPACE
29+ // to prevent colon sequences from being interpreted as
30+ // emoji shortcodes (without wrapping with code element).
31+ // See: https://docs.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax#using-emoji
32+ text = text. replacingOccurrences ( of: " : " , with: " : \u{200B} " )
33+ data = text. data ( using: . utf8)
2834 case . html:
2935 data = layout ( self ) . description. data ( using: . utf8)
3036 }
You can’t perform that action at this time.
0 commit comments