This repository was archived by the owner on Jun 1, 2023. It is now read-only.
File tree 2 files changed +10
-1
lines changed
Sources/swift-doc/Supporting Types 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
33
33
#130 by @mattt .
34
34
- Fixed file and directory unexpected permissions.
35
35
#146 by @niw .
36
+ - Fixed rendering of colon sequences in function signatures
37
+ as emoji shortcodes (e.g. ` :on: ` → 🔛).
38
+ #149 by @mattt .
36
39
- Fixed declarations for properties without explicit type annotations.
37
40
#150 by @mattt .
38
41
Original file line number Diff line number Diff line change @@ -24,7 +24,13 @@ extension Page {
24
24
let data : Data ?
25
25
switch format {
26
26
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)
28
34
case . html:
29
35
data = layout ( self ) . description. data ( using: . utf8)
30
36
}
You can’t perform that action at this time.
0 commit comments