Skip to content

Commit 70821e8

Browse files
authored
README.md: Fix example code
1 parent 74766e7 commit 70821e8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ pipeline.call(user_supplied_text) # recommended: can call pipeline over and over
9191
Filters can be custom ones you create (like `HelloJohnnyFilter`), and `HTMLPipeline` additionally provides several helpful ones (detailed below). If you only need a single filter, you can call one individually, too:
9292

9393
```ruby
94-
filter = HTMLPipeline::ConvertFilter::MarkdownFilter.new(text)
95-
filter.call
94+
filter = HTMLPipeline::ConvertFilter::MarkdownFilter.new
95+
filter.call(text)
9696
```
9797

9898
Filters combine into a sequential pipeline, and each filter hands its
@@ -104,9 +104,9 @@ used to pass around arguments and metadata between filters in a pipeline. For
104104
example, if you want to disable footnotes in the `MarkdownFilter`, you can pass an option in the context hash:
105105

106106
```ruby
107-
context = { markdown: extensions: { footnotes: false } }
108-
filter = HTMLPipeline::ConvertFilter::MarkdownFilter.new("Hi **world**!", context: context)
109-
filter.call
107+
context = { markdown: { extensions: { footnotes: false } } }
108+
filter = HTMLPipeline::ConvertFilter::MarkdownFilter.new(context: context)
109+
filter.call("Hi **world**!")
110110
```
111111

112112
Please refer to the documentation for each filter to understand what configuration options are available.

0 commit comments

Comments
 (0)