rdoc: fix syntax highlighting
This commit is contained in:
parent
0c46d32aa6
commit
472070d805
20
rdoc.md
20
rdoc.md
|
@ -6,6 +6,7 @@ layout: 2017/sheet
|
||||||
|
|
||||||
### Basic RDoc format
|
### Basic RDoc format
|
||||||
|
|
||||||
|
```rb
|
||||||
# Foo.
|
# Foo.
|
||||||
#
|
#
|
||||||
# @example
|
# @example
|
||||||
|
@ -18,16 +19,17 @@ layout: 2017/sheet
|
||||||
# @see http://url.com
|
# @see http://url.com
|
||||||
#
|
#
|
||||||
# @return [true] if so
|
# @return [true] if so
|
||||||
|
```
|
||||||
|
|
||||||
### Inline
|
### Inline
|
||||||
|
|
||||||
```
|
```markdown
|
||||||
*bold*
|
*bold*
|
||||||
_emphasized_
|
_emphasized_
|
||||||
+code+
|
+code+
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```markdown
|
||||||
http://www.link.com
|
http://www.link.com
|
||||||
See Models::User@Examples
|
See Models::User@Examples
|
||||||
{Google}[http://google.com]
|
{Google}[http://google.com]
|
||||||
|
@ -45,14 +47,14 @@ module MyModule # :nodoc: all
|
||||||
|
|
||||||
### Definition lists
|
### Definition lists
|
||||||
|
|
||||||
```
|
```rb
|
||||||
# == Definition lists
|
# == Definition lists
|
||||||
#
|
#
|
||||||
# list:: hi.
|
# list:: hi.
|
||||||
# +foo+:: parameterized
|
# +foo+:: parameterized
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```rb
|
||||||
# == Definition lists
|
# == Definition lists
|
||||||
# [foo] also
|
# [foo] also
|
||||||
# [bar] like this
|
# [bar] like this
|
||||||
|
@ -60,11 +62,14 @@ module MyModule # :nodoc: all
|
||||||
|
|
||||||
### Return types
|
### Return types
|
||||||
|
|
||||||
|
```rb
|
||||||
# @return [String]
|
# @return [String]
|
||||||
# @return [String, nil] the name
|
# @return [String, nil] the name
|
||||||
|
```
|
||||||
|
|
||||||
### Callseq
|
### Callseq
|
||||||
|
|
||||||
|
```rb
|
||||||
# :call-seq:
|
# :call-seq:
|
||||||
# ARGF.readlines(sep=$/) -> array
|
# ARGF.readlines(sep=$/) -> array
|
||||||
# ARGF.readlines(limit) -> array
|
# ARGF.readlines(limit) -> array
|
||||||
|
@ -73,10 +78,13 @@ module MyModule # :nodoc: all
|
||||||
# ARGF.to_a(sep=$/) -> array
|
# ARGF.to_a(sep=$/) -> array
|
||||||
# ARGF.to_a(limit) -> array
|
# ARGF.to_a(limit) -> array
|
||||||
# ARGF.to_a(sep, limit) -> array
|
# ARGF.to_a(sep, limit) -> array
|
||||||
|
```
|
||||||
|
|
||||||
### Category
|
### Category
|
||||||
|
|
||||||
|
```rb
|
||||||
# :category: Utilities
|
# :category: Utilities
|
||||||
|
```
|
||||||
|
|
||||||
### Sections
|
### Sections
|
||||||
|
|
||||||
|
@ -91,11 +99,11 @@ def expired?
|
||||||
|
|
||||||
### Using tomdoc
|
### Using tomdoc
|
||||||
|
|
||||||
```
|
```rb
|
||||||
# :markup: TomDoc
|
# :markup: TomDoc
|
||||||
```
|
```
|
||||||
|
|
||||||
Plase this at the beginning of the file.
|
Place this at the beginning of the file.
|
||||||
|
|
||||||
## Also see
|
## Also see
|
||||||
{: .-one-column}
|
{: .-one-column}
|
||||||
|
|
Loading…
Reference in New Issue