Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit d634f64

Browse files
committed
Revert "Add zero width space to escape emoji shortcodes (#149)"
This reverts commit aeed63c.
1 parent 57e4008 commit d634f64

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

Changelog.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4040
#130 by @mattt.
4141
- Fixed file and directory unexpected permissions.
4242
#146 by @niw.
43-
- Fixed rendering of colon sequences in function signatures
44-
as emoji shortcodes (e.g. `:on:` → 🔛).
45-
#149 by @mattt.
4643
- Fixed declarations for properties without explicit type annotations.
4744
#150 by @mattt.
4845
- Fixed visual regression for adjacent linked tokens in code block.

Sources/swift-doc/Supporting Types/Page.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,7 @@ extension Page {
2424
let data: Data?
2525
switch format {
2626
case .commonmark:
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)
27+
data = document.render(format: .commonmark).data(using: .utf8)
3428
case .html:
3529
data = layout(self).description.data(using: .utf8)
3630
}

0 commit comments

Comments
 (0)