Skip to content

Commit

Permalink
rdoc: fix syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
rstacruz committed Mar 3, 2018
1 parent 0c46d32 commit 472070d
Showing 1 changed file with 37 additions and 29 deletions.
66 changes: 37 additions & 29 deletions rdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,30 @@ layout: 2017/sheet

### Basic RDoc format

# Foo.
#
# @example
#
# y
# g
#
# @param [String] param_name The xx and xx.
#
# @see http://url.com
#
# @return [true] if so
```rb
# Foo.
#
# @example
#
# y
# g
#
# @param [String] param_name The xx and xx.
#
# @see http://url.com
#
# @return [true] if so
```
### Inline
```
```markdown
*bold*
_emphasized_
+code+
```

```
```markdown
http://www.link.com
See Models::User@Examples
{Google}[http://google.com]
Expand All @@ -45,38 +47,44 @@ module MyModule # :nodoc: all

### Definition lists

```
```rb
# == Definition lists
#
# list:: hi.
# +foo+:: parameterized
```

```
```rb
# == Definition lists
# [foo] also
# [bar] like this
```

### Return types

# @return [String]
# @return [String, nil] the name
```rb
# @return [String]
# @return [String, nil] the name
```
### Callseq
# :call-seq:
# ARGF.readlines(sep=$/) -> array
# ARGF.readlines(limit) -> array
# ARGF.readlines(sep, limit) -> array
#
# ARGF.to_a(sep=$/) -> array
# ARGF.to_a(limit) -> array
# ARGF.to_a(sep, limit) -> array
```rb
# :call-seq:
# ARGF.readlines(sep=$/) -> array
# ARGF.readlines(limit) -> array
# ARGF.readlines(sep, limit) -> array
#
# ARGF.to_a(sep=$/) -> array
# ARGF.to_a(limit) -> array
# ARGF.to_a(sep, limit) -> array
```

### Category

# :category: Utilities
```rb
# :category: Utilities
```

### Sections

Expand All @@ -91,11 +99,11 @@ def expired?

### Using tomdoc

```
```rb
# :markup: TomDoc
```

Plase this at the beginning of the file.
Place this at the beginning of the file.

## Also see
{: .-one-column}
Expand Down

0 comments on commit 472070d

Please sign in to comment.