<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/rdoc/markdown.rb, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Sync RDoc 6.14.0</title>
<updated>2025-05-22T22:04:47+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan.lo@shopify.com</email>
</author>
<published>2025-05-22T21:49:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=03eb777c69d64aa4941891a784c1fd67b44ea42c'/>
<id>03eb777c69d64aa4941891a784c1fd67b44ea42c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Require space between hash/content in ATX heading (#1140)</title>
<updated>2024-07-18T00:40:01+00:00</updated>
<author>
<name>Hartley McGuire</name>
<email>skipkayhil@gmail.com</email>
</author>
<published>2024-07-17T21:39:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d0c17cbd09e5455c203e8fd647e8967684562347'/>
<id>d0c17cbd09e5455c203e8fd647e8967684562347</id>
<content type='text'>
While writing some Markdown documentation for Rails, I came across an
interesting case where trying to link to an instance method at the start
of a line would instead parse as an H1 heading:

```markdown
#response_body=
```

Expected:

```html
&lt;a href=""&gt;&lt;code&gt;#response_body=&lt;/code&gt;&lt;/a&gt;
```

Actual:

```html
&lt;h1&gt;response_body=&lt;/h1&gt;
```

According to the CommonMark spec:

&gt; At least one space or tab is required between the # characters and the
&gt; heading’s contents, unless the heading is empty. Note that many
&gt; implementations currently do not require the space. However, the space
&gt; was required by the original ATX implementation, and it helps prevent
&gt; things like the following from being parsed as headings:
&gt;
&gt; Example 64

So while some implementations do not follow this requirement, I believe
RDoc should because it makes it easy to write text similar to Example 64
(which was used in the new test) and it also enables automatically
linking to instance methods at the start of a line.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While writing some Markdown documentation for Rails, I came across an
interesting case where trying to link to an instance method at the start
of a line would instead parse as an H1 heading:

```markdown
#response_body=
```

Expected:

```html
&lt;a href=""&gt;&lt;code&gt;#response_body=&lt;/code&gt;&lt;/a&gt;
```

Actual:

```html
&lt;h1&gt;response_body=&lt;/h1&gt;
```

According to the CommonMark spec:

&gt; At least one space or tab is required between the # characters and the
&gt; heading’s contents, unless the heading is empty. Note that many
&gt; implementations currently do not require the space. However, the space
&gt; was required by the original ATX implementation, and it helps prevent
&gt; things like the following from being parsed as headings:
&gt;
&gt; Example 64

So while some implementations do not follow this requirement, I believe
RDoc should because it makes it easy to write text similar to Example 64
(which was used in the new test) and it also enables automatically
linking to instance methods at the start of a line.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update generated code from https://github.com/ruby/rdoc/commit/5c7ea6fa15f403b1c84f5b823716f75595c97d8c</title>
<updated>2024-05-30T09:00:25+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2024-05-30T09:00:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f23c96581f6b6492770fd3b4735c64d35f1a1b5b'/>
<id>f23c96581f6b6492770fd3b4735c64d35f1a1b5b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/rdoc] Allow rich definition list labels for Markdown</title>
<updated>2024-03-11T11:00:51+00:00</updated>
<author>
<name>Hartley McGuire</name>
<email>skipkayhil@gmail.com</email>
</author>
<published>2024-03-07T01:22:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=08961ce8e31487b31d19d4f66c6ef1aba5c7cd30'/>
<id>08961ce8e31487b31d19d4f66c6ef1aba5c7cd30</id>
<content type='text'>
Previously, any sort of "rich" markup for a definition list's label
would cause the Markdown parser to not recognize a definition list:

```ruby
md = &lt;&lt;~md
`one`
:    This is a definition
md

doc = RDoc::Markdown.parse(md)
doc # =&gt; [doc: [para: "&lt;code&gt;one&lt;/code&gt;\n: This is a definition"]]
```

This commit tweaks the grammar for Markdown definition lists so that
labels can include "rich" markup such as bold (`**`), code (```), etc:

```ruby
md = &lt;&lt;~md
`one`
:    This is a definition
md

doc = RDoc::Markdown.parse(md)
doc # =&gt; [doc: [list: NOTE [item: ["&lt;code&gt;one&lt;/code&gt;"]; [para: "This is a definition"]]]]
```

The [PHP Markdown Extra][1] Spec does not seem to specify whether or not
this should be allowed, but it is allowed in the RDoc format:

```ruby
rdoc = &lt;&lt;~rdoc
+code+::
    This is a definition
rdoc

doc = RDoc::Markup.parse(rdoc)
doc # =&gt; [doc: [list: NOTE [item: ["+code+"]; [para: "This is a definition"]]]]
```

so accepting this change increases the parity of the two formats.

[1]: https://michelf.ca/projects/php-markdown/extra/#def-list

https://github.com/ruby/rdoc/commit/8f943bbba4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, any sort of "rich" markup for a definition list's label
would cause the Markdown parser to not recognize a definition list:

```ruby
md = &lt;&lt;~md
`one`
:    This is a definition
md

doc = RDoc::Markdown.parse(md)
doc # =&gt; [doc: [para: "&lt;code&gt;one&lt;/code&gt;\n: This is a definition"]]
```

This commit tweaks the grammar for Markdown definition lists so that
labels can include "rich" markup such as bold (`**`), code (```), etc:

```ruby
md = &lt;&lt;~md
`one`
:    This is a definition
md

doc = RDoc::Markdown.parse(md)
doc # =&gt; [doc: [list: NOTE [item: ["&lt;code&gt;one&lt;/code&gt;"]; [para: "This is a definition"]]]]
```

The [PHP Markdown Extra][1] Spec does not seem to specify whether or not
this should be allowed, but it is allowed in the RDoc format:

```ruby
rdoc = &lt;&lt;~rdoc
+code+::
    This is a definition
rdoc

doc = RDoc::Markup.parse(rdoc)
doc # =&gt; [doc: [list: NOTE [item: ["+code+"]; [para: "This is a definition"]]]]
```

so accepting this change increases the parity of the two formats.

[1]: https://michelf.ca/projects/php-markdown/extra/#def-list

https://github.com/ruby/rdoc/commit/8f943bbba4
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Link fixes</title>
<updated>2023-10-03T07:31:34+00:00</updated>
<author>
<name>BurdetteLamar</name>
<email>burdettelamar@yahoo.com</email>
</author>
<published>2023-08-31T13:16:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b4ab013b275dcd671ce2d449ab2b5118384cbbc6'/>
<id>b4ab013b275dcd671ce2d449ab2b5118384cbbc6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge RDoc-6.5.0</title>
<updated>2022-12-09T07:36:22+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2022-12-09T05:54:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4cbd3e19447591f66c3ab08c322a32aa53eae74f'/>
<id>4cbd3e19447591f66c3ab08c322a32aa53eae74f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/rdoc] Remove trailing spaces to fix CI</title>
<updated>2022-10-06T18:56:05+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-10-06T18:56:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1f2c84de83cef26e7e0bb6537992d3ad922533a8'/>
<id>1f2c84de83cef26e7e0bb6537992d3ad922533a8</id>
<content type='text'>
https://github.com/ruby/ruby/actions/runs/3199301563/jobs/5224898228

https://github.com/ruby/rdoc/commit/369e4fa32d60bc00982801a6848efe5338603ac5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/ruby/actions/runs/3199301563/jobs/5224898228

https://github.com/ruby/rdoc/commit/369e4fa32d60bc00982801a6848efe5338603ac5
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/rdoc] Add center align</title>
<updated>2022-10-06T14:22:02+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-10-06T08:39:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cf3056be69b3c07ffed423246df0dee2adda5ac1'/>
<id>cf3056be69b3c07ffed423246df0dee2adda5ac1</id>
<content type='text'>
https://github.com/ruby/rdoc/commit/512cc55a0e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/rdoc/commit/512cc55a0e
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/rdoc] Allow spaces around pipes</title>
<updated>2022-10-06T14:21:16+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-10-06T08:20:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=28e24ce35596b5faaf57f3ad4925656e22b23d1c'/>
<id>28e24ce35596b5faaf57f3ad4925656e22b23d1c</id>
<content type='text'>
https://github.com/ruby/rdoc/commit/3b3a583580
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/rdoc/commit/3b3a583580
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/rdoc] Allow escaped pipes in cells</title>
<updated>2022-10-06T14:17:49+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-10-06T08:26:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7c03c82444220a4d1425cf801fa6a5d3d253b835'/>
<id>7c03c82444220a4d1425cf801fa6a5d3d253b835</id>
<content type='text'>
https://github.com/ruby/rdoc/commit/333952a62d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/rdoc/commit/333952a62d
</pre>
</div>
</content>
</entry>
</feed>
