Skip to content

Commit

Permalink
Doc update and some (concomitant) bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
distler committed Jul 7, 2014
1 parent fe4c607 commit e8c8a98
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 49 deletions.
3 changes: 1 addition & 2 deletions docs/entity_test.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ List of symbols supported by Maruku
===================================

<?maruku
MaRuKu::Out::Latex.need_entity_table
all = []
ENTITY_TABLE.each do |k, e|
MaRuKu::Out::EntityTable.instance.each do |k, e|
if k.kind_of? String
all << (h=md_code("&#{e.html_entity};")) <<
" " << md_entity(e.html_entity) <<
Expand Down
64 changes: 19 additions & 45 deletions docs/maruku.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Mar**u**k**u**: a Markdown-superset interpreter

[Maruku] is a Markdown interpreter written in [Ruby].

> [Last release](#release_notes) is version 0.5.6 -- 2007-05-22.
> [Last release](#release_notes) is version 0.7.2 -- 2014-05-26.
>
> Install using [rubygems]:
>
Expand All @@ -27,8 +27,8 @@ Mar**u**k**u**: a Markdown-superset interpreter

[rubygems]: http://rubygems.org

* * *

Maruku features
===============

Maruku allows you to write in an easy-to-read-and-write syntax, like this:

Expand All @@ -45,7 +45,7 @@ or LaTeX, which is then converted to PDF:
Maruku implements:

* the original [Markdown syntax][markdown_html]
([HTML][markdown_html] or [PDF][markdown_pdf]), translated by Maruku).
([HTML][markdown_html] or [PDF][markdown_pdf]), translated by Maruku.

* all the improvements in [PHP Markdown Extra].

Expand All @@ -64,32 +64,32 @@ is Japanese, and also the sillable "ru" appears in Maruku.
[romaji]: http://en.wikipedia.org/wiki/Romaji
[katakana]: http://en.wikipedia.org/wiki/Katakana

[tests]: http://maruku.rubyforge.org/tests/
[maruku]: http://maruku.rubyforge.org/
[markdown_html]: http://maruku.rubyforge.org/markdown_syntax.html
[markdown_pdf]: http://maruku.rubyforge.org/markdown_syntax.pdf
[this_md]: http://maruku.rubyforge.org/maruku.md
[this_html]: http://maruku.rubyforge.org/maruku.html
[this_pdf]: http://maruku.rubyforge.org/maruku.pdf
[tests]: ./tests/
[maruku]: ./
[markdown_html]: ./markdown_syntax.html
[markdown_pdf]: ./markdown_syntax.pdf
[this_md]: ./maruku.md
[this_html]: ./maruku.html
[this_pdf]: ./maruku.pdf
[Andrea Censi]: http://www.dis.uniroma1.it/~acensi/

[contact]: http://www.dis.uniroma1.it/~acensi/contact.html
[gem]: http://rubygems.rubyforge.org/
[gem]: http://rubygems.org/
[tracker]: http://rubyforge.org/tracker/?group_id=2795


[ruby]: http://www.ruby-lang.org
[bluecloth]: http://www.deveiate.org/projects/BlueCloth
[Markdown syntax]: http://daringfireball.net/projects/markdown/syntax
[PHP Markdown Extra]: http://www.michelf.com/projects/php-markdown/extra/
[math syntax]: http://maruku.rubyforge.org/math.xhtml
[math syntax]: ./math.xhtml
[blahtex]: http://www.blahtex.org
[ritex]: http://ritex.rubyforge.org
[itex2mml]: http://golem.ph.utexas.edu/~distler/code/itexToMML/
[syntax]: http://syntax.rubyforge.org/
[itex2mml]: http://rubygems.org/gems/itextomml/
[syntax]: http://rubygems.org/gems/syntax/

[listings]: http://www.ctan.org/tex-archive/macros/latex/contrib/listings/
[meta_data_proposal]: http://maruku.rubyforge.org/proposal.html
[meta_data_proposal]: ./proposal.html
[markdown-discuss]: http://six.pairlist.net/mailman/listinfo/markdown-discuss

* * *
Expand All @@ -107,21 +107,7 @@ Table of contents: (**auto-generated by Maruku!**)
{:html: lang=xml}


Release notes {#release_notes}
--------------

Note: Maruku seems to be very robust, nevertheless it is still beta-level
software. So if you want to use it in production environments, please
check back in a month or so, while we squash the remaining bugs.

In the meantime, feel free to toy around, and please signal problems,
request features, by [contacting me][contact] or using the [tracker][tracker].
For issues about the Markdown syntax itself and improvements to it,
please write to the [Markdown-discuss mailing list][markdown-discuss].

Have fun!

See the [changelog](http://maruku.rubyforge.org/changelog.html#stable).


Usage
Expand All @@ -143,10 +129,6 @@ The method `to_html` outputs only an HTML fragment, while the method `to_html_do
puts doc.to_html_document
{:ruby}

You can have the REXML document tree with:

tree = doc.to_html_document_tree
{:ruby}

### From the command line ###

Expand Down Expand Up @@ -257,8 +239,8 @@ Entity | Result

See the [list of supported entities][ent_html] ([pdf][ent_pdf]).

[ent_html]: http://maruku.rubyforge.org/entity_test.html
[ent_pdf]: http://maruku.rubyforge.org/entity_test.pdf
[ent_html]: ./entity_test.html
[ent_pdf]: ./entity_test.pdf


### This header contains *emphasis* **strong text** and `code` ####
Expand Down Expand Up @@ -323,15 +305,7 @@ Examples of PHP Markdown Extra syntax {#extra}

* abbreviations or ABB for short.

*[ABB]: Simply an abbreviation


<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-155626-2";
urchinTracker();
</script>
[ABB]: Simply an abbreviation

<!--
Future developments {#future}
Expand Down
2 changes: 1 addition & 1 deletion lib/maruku/input/parse_doc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def safe_execute_code(object, code)
maruku_error "Exception while executing this:\n" +
code.gsub(/^/, ">") +
"\nThe error was:\n" +
(e.inspect + "\n" + e.caller.join("\n")).gsub(/^/, "|")
(e.inspect + "\n" + e.send(:caller).join("\n")).gsub(/^/, "|")
nil
end
end
Expand Down
4 changes: 4 additions & 0 deletions lib/maruku/output/entity_table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ def initialize
def entity(name)
@entity_table[name]
end

def each
@entity_table.each
end
end
end

2 changes: 1 addition & 1 deletion lib/maruku/output/to_html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def to_html_document_tree

# render footnotes
unless @doc.footnotes_order.empty?
body << render_footnotes(@doc)
body << render_footnotes
end

# When we are rendering a whole document, we add a signature
Expand Down
1 change: 1 addition & 0 deletions lib/maruku/output/to_latex.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'set'
require 'maruku/output/entity_table'

module MaRuKu::Out::Latex
module MDDocumentExtensions
Expand Down

0 comments on commit e8c8a98

Please sign in to comment.