rdoc: fix syntax highlighting

This commit is contained in:
Rico Sta. Cruz 2018-03-03 08:06:54 +08:00
parent 0c46d32aa6
commit 472070d805
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
1 changed files with 37 additions and 29 deletions

66
rdoc.md
View File

@ -6,28 +6,30 @@ layout: 2017/sheet
### Basic RDoc format ### Basic RDoc format
# Foo. ```rb
# # Foo.
# @example #
# # @example
# y #
# g # y
# # g
# @param [String] param_name The xx and xx. #
# # @param [String] param_name The xx and xx.
# @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,23 +62,29 @@ module MyModule # :nodoc: all
### Return types ### Return types
# @return [String] ```rb
# @return [String, nil] the name # @return [String]
# @return [String, nil] the name
```
### Callseq ### Callseq
# :call-seq: ```rb
# ARGF.readlines(sep=$/) -> array # :call-seq:
# ARGF.readlines(limit) -> array # ARGF.readlines(sep=$/) -> array
# ARGF.readlines(sep, limit) -> array # ARGF.readlines(limit) -> array
# # ARGF.readlines(sep, limit) -> array
# ARGF.to_a(sep=$/) -> array #
# ARGF.to_a(limit) -> array # ARGF.to_a(sep=$/) -> array
# ARGF.to_a(sep, limit) -> array # ARGF.to_a(limit) -> array
# ARGF.to_a(sep, limit) -> array
```
### Category ### Category
# :category: Utilities ```rb
# :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}