Sha256: c5b86fb43491e4a5d4a3a1ca64b38a91fdd8cdbaed5b5515053be5ac8c5ddf31

Contents?: true

Size: 268 Bytes

Versions: 5

Compression:

Stored size: 268 Bytes

Contents

module Storyblok::Richtext
  module Marks
    class Link < Mark

      def matching
        @node['type'] === 'link'
      end

      def tag
        [{
          tag: "a",
          attrs: @node['attrs'].slice('href', 'target')
        }]
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
storyblok-richtext-renderer-0.0.5 lib/storyblok/richtext/html_renderer/marks/link.rb
storyblok-richtext-renderer-0.0.4 lib/storyblok/richtext/html_renderer/marks/link.rb
storyblok-richtext-renderer-0.0.3 lib/storyblok/richtext/html_renderer/marks/link.rb
storyblok-richtext-renderer-0.0.2 lib/richtext/html_renderer/marks/link.rb
storyblok-richtext-renderer-0.0.1 lib/storyblok/richtext/html_renderer/marks/link.rb