Sha256: 97013d83a43608eaa27071f40ee253b2a2a292bf91d6223d332d971e667d7dae

Contents?: true

Size: 328 Bytes

Versions: 15

Compression:

Stored size: 328 Bytes

Contents

module InlineSvgHelper
  def inline_svg_tag(filename, title: nil)
    svg = ViteInlineSvgFileLoader.named(filename)
    svg = svg.sub(/\A<svg/, '<svg role="img"')
    svg = svg.sub(/\A<svg.*?>/, safe_join(['\0', "\n", tag.title(title)])) if title.present?

    svg.strip.html_safe # rubocop:disable Rails/OutputSafety
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
nextgen-0.14.0 template/app/helpers/inline_svg_helper.rb
nextgen-0.13.0 template/app/helpers/inline_svg_helper.rb
nextgen-0.12.0 template/app/helpers/inline_svg_helper.rb
nextgen-0.11.0 template/app/helpers/inline_svg_helper.rb
nextgen-0.10.0 template/app/helpers/inline_svg_helper.rb
nextgen-0.9.0 template/app/helpers/inline_svg_helper.rb
nextgen-0.8.0 template/app/helpers/inline_svg_helper.rb
nextgen-0.7.0 template/app/helpers/inline_svg_helper.rb
nextgen-0.6.0 template/app/helpers/inline_svg_helper.rb
nextgen-0.5.1 template/app/helpers/inline_svg_helper.rb
nextgen-0.5.0 template/app/helpers/inline_svg_helper.rb
nextgen-0.4.0 template/app/helpers/inline_svg_helper.rb
nextgen-0.3.0 template/app/helpers/inline_svg_helper.rb
nextgen-0.2.0 template/app/helpers/inline_svg_helper.rb
nextgen-0.1.0 template/app/helpers/inline_svg_helper.rb