Module: Jekyll::Microtypo
- Defined in:
- lib/jekyll/microtypo.rb,
lib/jekyll/microtypo/version.rb
Constant Summary collapse
- VERSION =
"2.0.0"
Class Method Summary collapse
Instance Method Summary collapse
-
#microtypo(input, locale = "en_US") ⇒ Object
Example: content | microtypo: “fr_FR” }.
Class Method Details
.settings(config) ⇒ Object
17 18 19 20 |
# File 'lib/jekyll/microtypo.rb', line 17 def self.settings(config) @settings ||= {} @settings[config.hash] ||= config["microtypo"] || {} end |
Instance Method Details
#microtypo(input, locale = "en_US") ⇒ Object
Example:
{{ content | microtypo: "fr_FR" }}
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/jekyll/microtypo.rb', line 24 def microtypo(input, locale = "en_US") bucket = [] recursive_parser(input, locale, bucket, QUEUE.length) # Clean empty lines bucket.join.tap do |result| result.gsub!(%r!\A\s*\n$!, "") end end |