Prefer textile over markup because markup doesn't support any tables. bähh.

This commit is contained in:
Benjamin Meichsner 2009-05-20 13:03:58 +02:00
parent 7de45543c4
commit d371839eba
3 changed files with 11 additions and 9 deletions

View File

@ -1,7 +1,7 @@
module PagesHelper module PagesHelper
def wikified_body(body) def wikified_body(body)
r = BlueCloth.new(body) r = RedCloth.new(body)
r.gsub!(/\[\[(.*?)(\|(.*?))?\]\]/) { wiki_link($1, $3) } r.gsub!(/\[\[(.*?)(\|(.*?))?\]\]/) { wiki_link($1, $3) }
sanitize r.to_html sanitize r.to_html
r.to_html r.to_html

View File

@ -8,14 +8,16 @@
%br/ %br/
:plain :plain
[[interner Link]]<br /> [[interner Link]]<br />
[externer Link](http://addresse.net)<br /> "externer Link":http://addresse.net<br />
*kursiv*<br /> h1. Erste Überschrift<br />
**Fett**<br /> h2. Unterüberschrift<br />
* erster Listenpunkt<br /> _kursiv_<br />
* zweiter Listenpunkt<br /> *Fett*<br />
# erster Listenpunkt<br />
# zweiter Listenpunkt<br />
## Unterpunkt<br />
%p %p
Übersicht über alle Formatierungen: = link_to "Tabellen, Styling, etc..", "http://hobix.com/textile/quick.html", :target => '_blank'
= link_to "Markdown Cheatsheet", "http://packetlife.net/static/cheatsheets/markdown.pdf", :target => '_blank'
- form_for @page do |f| - form_for @page do |f|
= f.error_messages = f.error_messages

View File

@ -68,7 +68,7 @@ Rails::Initializer.run do |config|
config.gem "fastercsv" config.gem "fastercsv"
config.gem "prawn" config.gem "prawn"
config.gem "haml", :version => '>=2.0.6' config.gem "haml", :version => '>=2.0.6'
config.gem 'BlueCloth', :lib => 'bluecloth' config.gem 'RedCloth', :lib => 'redcloth'
# The internationalization framework can be changed to have another default locale (standard is :en) or more load paths. # The internationalization framework can be changed to have another default locale (standard is :en) or more load paths.
# All files from config/locales/*.rb,yml are added automatically. # All files from config/locales/*.rb,yml are added automatically.