diff --git a/CHANGELOG b/CHANGELOG index 907d2779..d5c13de3 100755 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,9 +1,8 @@ * 0.10.0: Ported to ActionPack RedCloth 3.0.3 - BlueCloth is phased out - Default markup remains Textile-only, but Markdown wikis now understand Textile - syntax on the same page + BlueCloth is phased out, Markdown is rendered by RedCloth + Mix markup option understands both Textile and Markdown on the same page Instiki can serve static content (such as HTML or plain-text files) from ./public directory Much friendlier admin interface diff --git a/app/models/chunks/engines.rb b/app/models/chunks/engines.rb index 341c6857..b5587b3f 100644 --- a/app/models/chunks/engines.rb +++ b/app/models/chunks/engines.rb @@ -27,11 +27,17 @@ module Engines class Textile < AbstractEngine def mask - RedCloth.new(@content, @content.options[:engine_opts]).to_html([:textile]) + RedCloth.new(@content, @content.options[:engine_opts]).to_html(:textile) end end class Markdown < AbstractEngine + def mask + RedCloth.new(@content, @content.options[:engine_opts]).to_html(:markdown) + end + end + + class Mixed < AbstractEngine def mask RedCloth.new(@content, @content.options[:engine_opts]).to_html end @@ -43,6 +49,6 @@ module Engines end end - MAP = { :textile => Textile, :markdown => Markdown, :rdoc => RDoc } + MAP = { :textile => Textile, :markdown => Markdown, :mixed => Mixed, :rdoc => RDoc, } MAP.default = Textile end diff --git a/app/views/admin/edit_web.rhtml b/app/views/admin/edit_web.rhtml index 99010fd6..9d8010b6 100644 --- a/app/views/admin/edit_web.rhtml +++ b/app/views/admin/edit_web.rhtml @@ -21,16 +21,16 @@
Markup:    Color:

diff --git a/app/views/markdown_help.rhtml b/app/views/markdown_help.rhtml index fe196d4c..067be08d 100644 --- a/app/views/markdown_help.rhtml +++ b/app/views/markdown_help.rhtml @@ -1,16 +1,12 @@ -

-

Markdown formatting tips (advanced)

- - - - - - - - - - -
_your text_your text
**your text**your text
`my code`my code
* Bulleted list
* Second item
• Bulleted list
• Second item
1. Numbered list
1. Second item
1. Numbered list
2. Second item
[link name](URL)link name
***Horizontal ruler
<http://url>
<email@add.com>
Auto-linked
![Alt text](URL)Image
- - <%= render 'wiki_words_help' %> -
\ No newline at end of file +

Markdown formatting tips (advanced)

+ + + + + + + + + + +
_your text_your text
**your text**your text
`my code`my code
* Bulleted list
* Second item
• Bulleted list
• Second item
1. Numbered list
1. Second item
1. Numbered list
2. Second item
[link name](URL)link name
***Horizontal ruler
<http://url>
<email@add.com>
Auto-linked
![Alt text](URL)Image
diff --git a/app/views/rdoc_help.rhtml b/app/views/rdoc_help.rhtml index 5732a18d..1afaff5c 100644 --- a/app/views/rdoc_help.rhtml +++ b/app/views/rdoc_help.rhtml @@ -1,16 +1,12 @@ -
-

RDoc formatting tips (advanced)

- - - - - - - - - - -
_your text_your text
*your text*your text
* Bulleted list
* Second item
• Bulleted list
• Second item
1. Numbered list
2. Second item
1. Numbered list
2. Second item
+my_code+my_code
---Horizontal ruler
[[URL linkname]]linkname
http://url
mailto:e@add.com
Auto-linked
imageURLImage
- - <%= render 'wiki_words_help' %> -
\ No newline at end of file +

RDoc formatting tips (advanced)

+ + + + + + + + + + +
_your text_your text
*your text*your text
* Bulleted list
* Second item
• Bulleted list
• Second item
1. Numbered list
2. Second item
1. Numbered list
2. Second item
+my_code+my_code
---Horizontal ruler
[[URL linkname]]linkname
http://url
mailto:e@add.com
Auto-linked
imageURLImage
diff --git a/app/views/textile_help.rhtml b/app/views/textile_help.rhtml index 86224147..e6bee9b1 100644 --- a/app/views/textile_help.rhtml +++ b/app/views/textile_help.rhtml @@ -1,20 +1,16 @@ -
-

Textile formatting tips (advanced)

- - - - - - - - - - -
_your text_your text
*your text*your text
%{color:red}hello%hello
* Bulleted list
* Second item
• Bulleted list
• Second item
# Numbered list
# Second item
1. Numbered list
2. Second item
"linkname":URLlinkname
|a|table|row|
|b|table|row|
Table
http://url
email@address.com
Auto-linked
!imageURL!Image
+

Textile formatting tips (advanced)

+ + + + + + + + + + +
_your text_your text
*your text*your text
%{color:red}hello%hello
* Bulleted list
* Second item
• Bulleted list
• Second item
# Numbered list
# Second item
1. Numbered list
2. Second item
"linkname":URLlinkname
|a|table|row|
|b|table|row|
Table
http://url
email@address.com
Auto-linked
!imageURL!Image
- <%= render 'wiki_words_help' %> -
- \ No newline at end of file + diff --git a/app/views/wiki/edit.rhtml b/app/views/wiki/edit.rhtml index 61a221fa..6da0f858 100644 --- a/app/views/wiki/edit.rhtml +++ b/app/views/wiki/edit.rhtml @@ -6,7 +6,11 @@ <%= "

Please correct the error that caused this error in rendering:
#{@params["msg"]}

" if @params["msg"] %> -<%= render("#{@web.markup}_help") if @web %> +
+ <%= render("#{@web.markup}_help") %> + <%= render 'wiki_words_help' %> +
+ <%= form_tag({ :action => 'save', :web => @web.address, :id => @page.name}, {'id' => 'editForm', 'method' => 'post', 'onSubmit' => 'cleanAuthorName();'})