Class: Coradoc::Markdown::Serializer::Strategies::Autolink::Angle

Inherits:
Base
  • Object
show all
Defined in:
lib/coradoc/markdown/serializer/strategies/autolink/angle.rb

Overview

CommonMark angle-bracket autolink: <example.com> Renders identically across all HTML-aware renderers.

Direct Known Subclasses

Bare

Class Method Summary collapse

Methods inherited from Base

mode_name

Class Method Details

.applies?(url, text, ctx) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/coradoc/markdown/serializer/strategies/autolink/angle.rb', line 14

def applies?(url, text, ctx)
  ctx.config.autolinks && url_eql_text?(url, text)
end

.render(url, _text, _ctx) ⇒ Object



18
19
20
# File 'lib/coradoc/markdown/serializer/strategies/autolink/angle.rb', line 18

def render(url, _text, _ctx)
  "<#{url}>"
end