Skip to content

Commit 96542aa

Browse files
committed
[Docs] Tweak the "Template support" doc
This commit prevents unintended hyphens from being displayed instead of highlights: https://docs.rubocop.org/rubocop/1.60/extensions.html#template-support
1 parent c3921c0 commit 96542aa

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/modules/ROOT/pages/extensions.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,14 +216,14 @@ Normally, RuboCop extracts one Ruby code from one Ruby file, however there are m
216216
Ruby extractor must be a callable object that takes a `RuboCop::ProcessedSource` and returns an `Array` of `Hash` that contains Ruby source codes and their offsets from original source code, or returns `nil` for unrelated file.
217217

218218
[source,ruby]
219-
---
219+
----
220220
ruby_extractor.call(processed_source)
221-
---
221+
----
222222

223223
An example returned value from a Ruby extractor would be as follows:
224224

225-
[source]
226-
---
225+
[source,ruby]
226+
----
227227
[
228228
{
229229
offset: 2,
@@ -232,16 +232,16 @@ An example returned value from a Ruby extractor would be as follows:
232232
{
233233
offset: 10,
234234
processed_source: #<RuboCop::ProcessedSource>
235-
},
235+
}
236236
]
237-
---
237+
----
238238

239239
On the extension side, the code would be something like this:
240240

241241
[source,ruby]
242-
---
242+
----
243243
RuboCop::Runner.ruby_extractors.unshift(ruby_extractor)
244-
---
244+
----
245245

246246
`RuboCop::Runners.ruby_extractors` is processed from the beginning and ends when one of them returns a non-nil value. By default, there is a Ruby extractor that returns the given Ruby source code with offset 0, so you can unshift any Ruby extractor before it.
247247

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy