Skip to content

Commit 0288d02

Browse files
committed
Add CodeSpan support
1 parent df61fe0 commit 0288d02

4 files changed

Lines changed: 10 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Added
6+
7+
- `CodeSpan` support
8+
39
## [0.11.0] - 2019-09-16
410

511
### Added

CommonplaceBookApp.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CommonplaceBookApp/RenderedMarkdown+Stylesheet.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ extension MarkdownAttributedStringRenderer {
5858
self.init()
5959
formattingFunctions[.emphasis] = { $1.italic = true }
6060
formattingFunctions[.bold] = { $1.bold = true }
61+
formattingFunctions[.codeSpan] = { $1.familyName = "Menlo" }
6162
renderFunctions[.delimiter] = { _, _ in NSAttributedString() }
6263
renderFunctions[.clozeHint] = { _, _ in NSAttributedString() }
6364
defaultAttributes = [

CommonplaceBookApp/TextEditViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ final class TextEditViewController: UIViewController {
116116
formatters[.bold] = { $1.bold = true }
117117
formatters[.emphasis] = { $1.italic = true }
118118
formatters[.table] = { $1.familyName = "Menlo" }
119+
formatters[.codeSpan] = { $1.familyName = "Menlo" }
119120
formatters[.cloze] = { $1.backgroundColor = UIColor.systemYellow.withAlphaComponent(0.3) }
120121
formatters[.clozeHint] = {
121122
$1.color = UIColor.secondaryLabel

0 commit comments

Comments
 (0)