【问题标题】:How do I escape a Swift doc comment Callout?如何逃避 Swift 文档注释标注?
【发布时间】:2017-02-28 08:49:32
【问题描述】:
我在 Swift 中有以下文档注释:
/**
- Trace
- ↓
- Debug
- ↓
- Information
- ↓
- Warning
- ↓
- Error
*/
说“警告”的行不会在 Xcode 中呈现,因为“-警告”是 swift doc cmets 中的关键字标注。我怎样才能摆脱标注?
【问题讨论】:
标签:
swift
xcode
documentation
escaping
headerdoc
【解决方案1】:
不是一个完美的解决方案,但您可以用反引号 (`) 将警告括起来。这会稍微改变它的显示风格:
/**
- Trace
- ↓
- Debug
- ↓
- Information
- ↓
- `Warning`
- ↓
- Error
*/
【解决方案2】:
您可以在关键字前使用零宽度空格 (​):
/**
- Trace
- ↓
- Debug
- ↓
- Information
- ↓
- ​Warning
- ↓
- Error
*/