Sha256: f702fb20707ca9b0b60b417c619822a82024661253003c356bd7c07c29319d96

Contents?: true

Size: 267 Bytes

Versions: 8

Compression:

Stored size: 267 Bytes

Contents

require_relative './base_block_renderer'

module RichTextRenderer
  # a node renderer.
  class HyperlinkRenderer < BaseBlockRenderer
    # Renders hyperlink
    def render(node)
      "<a href=\"#{node['data']['uri']}\">#{render_content(node)}</a>"
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rich_text_renderer-0.3.2 lib/rich_text_renderer/block_renderers/hyperlink_renderer.rb
rich_text_renderer-0.3.1 lib/rich_text_renderer/block_renderers/hyperlink_renderer.rb
rich_text_renderer-0.3.0 lib/rich_text_renderer/block_renderers/hyperlink_renderer.rb
rich_text_renderer-0.2.3 lib/rich_text_renderer/block_renderers/hyperlink_renderer.rb
rich_text_renderer-0.2.2 lib/rich_text_renderer/block_renderers/hyperlink_renderer.rb
rich_text_renderer-0.2.1 lib/rich_text_renderer/block_renderers/hyperlink_renderer.rb
rich_text_renderer-0.2.0 lib/rich_text_renderer/block_renderers/hyperlink_renderer.rb
rich_text_renderer-0.1.0 lib/rich_text_renderer/block_renderers/hyperlink_renderer.rb