No release in over a year
Vident support for better_html. If you use better_html, you will need to install this gem too.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 2.0.0, < 3
>= 7, < 8
>= 0.8.0, < 1
 Project Readme

Vident::BetterHtml

Short description and motivation.

Usage

How to use my plugin.

BetterHtml.config = BetterHtml::Config.new(YAML.load(File.read(".better-html.yml")))

BetterHtml.configure do |config|
  config.template_exclusion_filter = proc { |filename| !filename.start_with?(Rails.root.to_s) }
end
# ViewComponent needs to do this hack to work in certain cases
# see https://github.com/Shopify/better-html/pull/98
class BetterHtml::HtmlAttributes
  alias_method :to_s_without_html_safe, :to_s

  def to_s
    to_s_without_html_safe.html_safe
  end
end

Installation

Add this line to your application's Gemfile:

gem "vident-better_html"

And then execute:

$ bundle

Or install it yourself as:

$ gem install vident-better_html

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.