Module: Docgenerator::Creole

Defined in:
lib/docgenerator/creole/base.rb,
lib/docgenerator/creole/creole.rb,
lib/docgenerator/creole/plugins.rb,
lib/docgenerator/creole/tabular.rb,
lib/docgenerator/creole/document.rb,
lib/docgenerator/creole/characters.rb,
lib/docgenerator/creole/inclusions.rb,
lib/docgenerator/creole/placeholder.rb,
lib/docgenerator/creole/plugins/rail.rb,
lib/docgenerator/creole/plugins/tikz.rb,
lib/docgenerator/creole/plugins/index.rb,
lib/docgenerator/creole/plugins/struktex.rb,
lib/docgenerator/creole/plugins/todonotes.rb,
lib/docgenerator/creole/inclusion_and_plugins.rb,
lib/docgenerator/creole/plugins/rubycode4creole.rb

Overview

Collect the classes to handle Creole-input.

More about creole at www.wikicreole.org/

Defined Under Namespace

Modules: Characters, Inclusions, Index, Placeholders, Plugins, Rail, Rubycode, Todo Classes: Creole, Creole_document, Creole_inclusion_and_plugin, Creole_line, Creole_longtable, Creole_structogramm, Creole_tab, Creole_tabular, Creole_tabular_csv, Placeholder

Constant Summary collapse

VERSION =
'3.0.0'
CHARACTERS =

Hash with Characters. This characters will be converted into elements.

{
  '%' => element(:'%'),
  '$' => element(:'$'),
  '&' => element(:ampersand),
  '->' => element(:rightarrow),
  '=>' => element(:Rightarrow),
  '<-' => element(:leftarrow),
  '<=' => element(:Leftarrow),
  '_' => element(:underscore),
  '' => element(:ldots),  
  '' => element(:sbquo),   #	einfaches low-9-Zeichen, U+201A , &#8218;
  '' => element(:rsquo),   #'zu &#8217;
  '' => element(:bdquo),   #"auf  &#8222;  #bottom double quote
  '' => element(:ldquo),    #"zu 	&#8220; #left double quote
  '' => element(:rdquo),    #right double quote
  '' => element(:ndash),  #	&#8211;
  '' => element(:mdash),  #	&#8211;
}

Class Method Summary collapse

Class Method Details

.help(option = :syntax) ⇒ Object

Add a quick online-help.



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/docgenerator/creole/base.rb', line 53

def self.help( option = :syntax)
  hlp = []
  hlp << "==Creole help #{option}"
  case option
    when :syntax
      hlp << <<Syntax
Headings:
  = Level 1 (largest) =
  == Level 2 ==
see also Creole.help(:headings)

Bold And Italics:
** Bold
// Italics
You can close them. If not, the markup end with the paragraph.

Links: See Creole.help(:links)
Syntax
    when :creole
      hlp << <<creole
docgenerator/creole has some special features:
*headings allows labels ([key] direct after the =)
*line breaks are ignored, the text is wrapped.
  (you can set it off with option :wrap_at => 0)
creole
   when :headings
      hlp << <<headings
Headings:
  = Level 1 (largest) =
  == Level 2 ==
  === Level 3 ===
  ==== Level 4 ====
  ===== Level 5 =====
  ====== Level 6 ======
  === Also level 3
  === Also level 3 =
  === Also level 3 ==
  === **not** //parsed// ===
Headings with label:  
  =[lev1] Level 1 (largest) =
  ==[lev1.1] Level 2 ==

The content is not parsed.
Details see http://www.wikicreole.org/wiki/Headings
headings
  when :links
    hlp << <<links
Explicit:
* [[http://ruby.lickert.net/docgenerator]]
* [[http://ruby.lickert.net/docgenerator|Details on docgenerator.rb]]

Implicit:
* http://ruby.lickert.net/docgenerator
links
  when :tabular
    hlp << <<tabular
Wikimedia-like syntax:
  <<<tabular
  |!columns=3
  |!columndescription=ccc
  |=1
  |=2
  |=3
  |-
  |eins
  |zwei
  |drei
  |-
  |one
  |two
  |three
  >>>
tabular
    else
      hlp << "Undefined help for #{option.inspect}"
  end
  return hlp.join("\n")
end