Skip to content

Commit 225bcad

Browse files
committed
API guidelines: revises warning about +...+ [ci skip]
Modern RDoc accepts a few more things in +...+. In particular symbols work now. The current regexp in RDoc is https://github.com/rdoc/rdoc/blob/v4.1.1/lib/rdoc/markup/attribute_manager.rb#L133.
1 parent 0df1f91 commit 225bcad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

guides/source/api_documentation_guidelines.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,10 @@ class Array
163163
end
164164
```
165165

166-
WARNING: Using a pair of `+...+` for fixed-width font only works with **words**; that is: anything matching `\A\w+\z`. For anything else use `<tt>...</tt>`, notably symbols, setters, inline snippets, etc.
166+
WARNING: Using `+...+` for fixed-width font only works with simple content like
167+
ordinary method names, symbols, paths (with forward slashes), etc. Please use
168+
`<tt>...</tt>` for everything else, notably class or module names with a
169+
namespace as in `<tt>ActiveRecord::Base</tt>`.
167170

168171
### Regular Font
169172

0 commit comments

Comments
 (0)