You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-16Lines changed: 13 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,10 +19,10 @@ summary of some of YARD's notable features.
19
19
20
20
## Feature List
21
21
22
-
**1. RDoc/SimpleMarkup Formatting Compatibility**: YARD is made to be compatible
23
-
with RDoc formatting. In fact, YARD does no processing on RDoc documentation
24
-
strings, and leaves this up to the output generation tool to decide how to
25
-
render the documentation.
22
+
**1. Builtin RDoc/Markdown Hybrid Support**: YARD ships with a builtin markup
23
+
renderer that supports both RDoc and Markdown formatting out of the box—no
24
+
external gem required. You can freely mix RDoc-style and Markdown-style
25
+
documentation without installing any additional libraries.
26
26
27
27
**2. Yardoc Meta-tag Formatting Like Python, Java, Objective-C and other
28
28
languages**: YARD uses a '@tag' style definition syntax for meta tags alongside
@@ -114,20 +114,17 @@ $ gem install yard
114
114
Alternatively, if you've checked the source out directly, you can call
115
115
`rake install` from the root project directory.
116
116
117
-
**Important Note for Debian/Ubuntu users:** there's a possible chance your Ruby
118
-
install lacks RDoc, which is occasionally used by YARD to convert markup to
119
-
HTML. If running `which rdoc` turns up empty, install RDoc by issuing:
117
+
### Markup rendering
120
118
121
-
```sh
122
-
$ sudo apt-get install rdoc
123
-
```
124
-
125
-
### Markdown parser
119
+
YARD includes a builtin renderer that handles both RDoc and Markdown markup
120
+
types without any external dependencies. To switch the default markup type,
121
+
pass `-m markdown` (or `-m rdoc`) to `yard doc`, or add it to your `.yardopts`
122
+
file.
126
123
127
-
When rendering markdown, yard will use one of several possible markdown providers,
128
-
[in order of priority](https://github.com/lsegal/yard/blob/e833aac7a01510245dd4ae1d1d18b046c8293c2d/lib/yard/templates/helpers/markup_helper.rb#L26-L33).
129
-
If you are experiencing rendering bugs (example [1](https://github.com/lsegal/yard/issues/1410)[2](https://github.com/lsegal/yard/issues/1543)), try adding one of the
130
-
gems further up in the list to your Gemfile.
124
+
For optional extra rendering features (e.g. GitHub-Flavoured Markdown fenced
125
+
code blocks, tables, or specific Markdown extensions), you can install an
126
+
additional provider gem such as `redcarpet`, `commonmarker`, or `kramdown` and
127
+
select it explicitly with `-M PROVIDER` (e.g. `yard doc -m markdown -M redcarpet`).
Copy file name to clipboardExpand all lines: docs/WhatsNew.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,24 @@
6
6
7
7
YARD now supports parsing Ruby signature files (.rbs) with full docstring support. This means you can write your documentation in `.rbs` files and have it show up in generated documentation, and use `.rbs` files alongside `.rb` sources to supplement type and API information.
8
8
9
+
## New built-in Markdown renderer (0.9.40)
10
+
11
+
YARD now ships with a built-in Markdown renderer (`YARD::Templates::Helpers::Markup::HybridMarkdown`)
12
+
that requires **no external gems**. It supports a practical subset of GitHub Flavored Markdown (GFM)
13
+
as well as common RDoc markup forms, including:
14
+
15
+
- ATX and setext headings (`#`, `=`)
16
+
- Fenced code blocks (`` ``` `` and `~~~`) as well as RDoc formatted `+text+` blocks.
17
+
- Tables, blockquotes, and thematic breaks
18
+
- Ordered and unordered lists (including RDoc-style)
19
+
- Inline emphasis, code, links, and images
20
+
- HTML passthrough blocks
21
+
22
+
This renderer is the **default** for both the `rdoc` and `markdown` markup types—no gem
23
+
installation required. If an optional provider gem (e.g. `redcarpet`, `kramdown`,
24
+
`commonmarker`) is installed and selected, YARD will use it instead for extra features such
25
+
as custom extensions or stricter spec compliance.
26
+
9
27
## `#-` comment block separators (0.9.40)
10
28
11
29
YARD now recognizes a trailing `#-` line as a separator between comment
0 commit comments