Module: Marker
- Defined in:
- lib/marker.rb,
lib/marker/text.rb,
lib/marker/links.rb,
lib/marker/lists.rb,
lib/marker/common.rb,
lib/marker/markup.rb,
lib/marker/headings.rb,
lib/marker/verbatim.rb,
lib/marker/templates.rb
Overview
:nodoc:
Defined Under Namespace
Modules: DefaultTemplates Classes: Argument, Arguments, BlockArgument, Bold, Bulleted, Definition, Delimiter, Document, Escaped, ExternalLink, Footnotes, Heading, HorizRule, Indented, InlineArgument, InternalLink, Italic, ItemBuilder, List, ListBuilder, ListNode, Markup, Numbered, Paragraph, ParseNode, Phrase, Protocol, RecursiveList, Template, TextBlock, URL, Verbatim, VerbatimArea, Word
Class Method Summary collapse
-
.link_base ⇒ Object
:nodoc:.
-
.link_base=(url) ⇒ Object
Sets the base url for internal links.
-
.parse(markup) ⇒ Object
Parses the given
markup
string and returns the result. -
.parse_file(filename) ⇒ Object
Parses markup read from the file
filename
and returns the result. -
.parser ⇒ Object
Returns a Marker markup parser instance (Marker::LanguageParser).
-
.render_options ⇒ Object
:nodoc:.
-
.render_options=(options) ⇒ Object
sets the default options used when rendering markup.
-
.templates ⇒ Object
:nodoc:.
-
.templates=(mod) ⇒ Object
Adds the instance methods of
mod
to the templates that will be used when rendering text.
Class Method Details
.link_base ⇒ Object
:nodoc:
52 53 54 |
# File 'lib/marker.rb', line 52 def link_base #:nodoc: @@link_base ||= '' end |
.link_base=(url) ⇒ Object
Sets the base url for internal links. If not set, internal links will begin with ‘/’
48 49 50 |
# File 'lib/marker.rb', line 48 def link_base=( url ) @@link_base = url end |
.parse(markup) ⇒ Object
Parses the given markup
string and returns the result
71 72 73 |
# File 'lib/marker.rb', line 71 def parse( markup ) parser.parse( markup ) end |
.parse_file(filename) ⇒ Object
Parses markup read from the file filename
and returns the result
76 77 78 |
# File 'lib/marker.rb', line 76 def parse_file( filename ) parser.parse( File.read( filename ) ) end |
.parser ⇒ Object
Returns a Marker markup parser instance (Marker::LanguageParser)
66 67 68 |
# File 'lib/marker.rb', line 66 def parser @@parser ||= LanguageParser.new end |
.render_options ⇒ Object
:nodoc:
61 62 63 |
# File 'lib/marker.rb', line 61 def #:nodoc: @@render_options ||= {} end |
.render_options=(options) ⇒ Object
sets the default options used when rendering markup
57 58 59 |
# File 'lib/marker.rb', line 57 def ( ) @@render_options = end |
.templates ⇒ Object
:nodoc:
42 43 44 |
# File 'lib/marker.rb', line 42 def templates #:nodoc: @@templates ||= Marker::DefaultTemplates end |
.templates=(mod) ⇒ Object
38 39 40 |
# File 'lib/marker.rb', line 38 def templates=( mod ) @@templates = Marker::DefaultTemplates.extend( mod ) end |