Class: Jekyll::Scholar::QuoteTag
- Inherits:
-
Liquid::Block
- Object
- Liquid::Block
- Jekyll::Scholar::QuoteTag
- Includes:
- Utilities
- Defined in:
- lib/jekyll/scholar/tags/quote.rb
Instance Attribute Summary collapse
-
#pages ⇒ Object
readonly
Returns the value of attribute pages.
Attributes included from Utilities
#config, #context, #keys, #prefix, #query, #site, #text
Instance Method Summary collapse
-
#initialize(tag_name, arguments, tokens) ⇒ QuoteTag
constructor
A new instance of QuoteTag.
- #render(context) ⇒ Object
Methods included from Utilities
#base_url, #bibliography, #bibliography_tag, #bibliography_template, #bibtex_file, #bibtex_files, #bibtex_filters, #bibtex_options, #bibtex_path, #bibtex_paths, #citation_item_for, #citation_number, #cite, #cite_details, #cited_keys, #cited_only?, #cited_references, #content_tag, #details_file_for, #details_link_for, #details_path, #entries, #extend_path, #generate_details?, #join_strings?, #link_to, #liquid_template, #liquidify, #load_repository, #locators, #missing_reference, #optparse, #reference_tag, #reference_tagname, #render_bibliography, #render_citation, #renderer, #replace_strings?, #repository, #repository?, #repository_link_for, #repository_path, #set_context_to, #split_arguments, #style
Constructor Details
Instance Attribute Details
#pages ⇒ Object (readonly)
Returns the value of attribute pages.
7 8 9 |
# File 'lib/jekyll/scholar/tags/quote.rb', line 7 def pages @pages end |
Instance Method Details
#render(context) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/jekyll/scholar/tags/quote.rb', line 16 def render(context) set_context_to context quote = super.strip.gsub(/\n\n/, '</p><p>').gsub(/\n/, '<br/>') quote = content_tag :p, quote citation = cite keys quote << content_tag(:cite, citation) content_tag :blockquote, quote end |