Module: Newstile

Included in:
Parser::Newstile
Defined in:
lib/newstile/error.rb,
lib/newstile/utils.rb,
lib/newstile/parser.rb,
lib/newstile/options.rb,
lib/newstile/version.rb,
lib/newstile/document.rb,
lib/newstile/converter.rb,
lib/newstile/utils/html.rb,
lib/newstile/parser/base.rb,
lib/newstile/parser/html.rb,
lib/newstile/converter/base.rb,
lib/newstile/converter/html.rb,
lib/newstile/utils/entities.rb,
lib/newstile/converter/latex.rb,
lib/newstile/parser/newstile.rb,
lib/newstile/converter/markdown.rb,
lib/newstile/converter/newstile.rb,
lib/newstile/utils/ordered_hash.rb,
lib/newstile/parser/newstile/eob.rb,
lib/newstile/parser/newstile/html.rb,
lib/newstile/parser/newstile/link.rb,
lib/newstile/parser/newstile/list.rb,
lib/newstile/parser/newstile/math.rb,
lib/newstile/parser/newstile/table.rb,
lib/newstile/parser/newstile/header.rb,
lib/newstile/parser/newstile/autolink.rb,
lib/newstile/parser/newstile/codespan.rb,
lib/newstile/parser/newstile/emphasis.rb,
lib/newstile/parser/newstile/footnote.rb,
lib/newstile/parser/newstile/codeblock.rb,
lib/newstile/parser/newstile/extension.rb,
lib/newstile/parser/newstile/paragraph.rb,
lib/newstile/parser/newstile/blank_line.rb,
lib/newstile/parser/newstile/blockquote.rb,
lib/newstile/parser/newstile/line_break.rb,
lib/newstile/parser/newstile/html_entity.rb,
lib/newstile/parser/newstile/abbreviation.rb,
lib/newstile/parser/newstile/smart_quotes.rb,
lib/newstile/parser/newstile/escaped_chars.rb,
lib/newstile/parser/newstile/attribute_list.rb,
lib/newstile/parser/newstile/block_boundary.rb,
lib/newstile/parser/newstile/horizontal_rule.rb,
lib/newstile/parser/newstile/typographic_symbol.rb

Overview

– Copyright © 2009-2010 Thomas Leitner <[email protected]>

This file is part of newstile.

newstile is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <www.gnu.org/licenses/>. ++

Defined Under Namespace

Modules: Converter, Options, Parser, Utils Classes: Document, Element, Error

Constant Summary collapse

VERSION =

The newstile version.

'1.0.1'

Class Method Summary collapse

Class Method Details

.data_dirObject

Return the data directory for newstile.



35
36
37
38
39
40
41
42
43
# File 'lib/newstile/document.rb', line 35

def self.data_dir
  unless defined?(@@data_dir)
    require 'rbconfig'
    @@data_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'data', 'newstile'))
    @@data_dir = File.expand_path(File.join(Config::CONFIG["datadir"], "newstile")) if !File.exists?(@@data_dir)
    raise "newstile data directory not found! This is a bug, please report it!" unless File.directory?(@@data_dir)
  end
  @@data_dir
end