Commit Graph

88 Commits (40fd643680688ac1ca257c8e357cbdc248ec903a)

Author SHA1 Message Date
Jacques Distler 40fd643680 Update Maruku 2011-12-03 17:31:53 -06:00
Jacques Distler f6d350302c Another one... 2011-09-23 01:25:52 -05:00
Jacques Distler e4b00f0bff Fix bug in Maruku to_html_document_tree
Reported by Remi.
2011-09-22 07:52:40 -05:00
Jacques Distler 2801421969 Another Maruku bug: bold in italics 2011-08-27 19:31:02 -05:00
Jacques Distler 2d303d54a0 Better text/html serialization
For the Andrew Staceys of this world:
deal with empty element in a more
text/html-friendly fashion.
2011-08-27 02:40:40 -05:00
Jacques Distler 27ad6ff2a8 Multiple instances of the same abbreviation
Convert all of them, not just the first, when
they occur in the same string.
2011-08-26 20:55:04 -05:00
Jacques Distler 6f18c90a50 Ack! 2 more Maruku Errors
1. #to_html_code was not working
  (my own #$%* fault, for trying
  to be too fancy).
2. Empty list items. 
   Reported by Andrew Stacey
2011-08-22 10:20:17 -05:00
Jacques Distler 477bd91567 More Maruku #to_markdown fixes.
Is there any point to this?
What version of Markdown are
we targetting, anyway?
2011-08-21 13:41:20 -05:00
Jacques Distler f463a3b1c8 Fix Maruku Indented Codeblocks
I'd screwed that up.
Also, fix some bugs in the #to_md
output method. Still not correct
(and I'm not sure I'm going to
bother completing the job), but
better.
2011-08-21 02:43:43 -05:00
Jacques Distler 3c650f2cf6 StringScanner is not multibyte-safe. Avoid like the plague. 2011-08-15 10:18:18 -05:00
Jacques Distler f7bce2c773 Another Maruku link bug 2011-08-14 16:54:21 -05:00
Jacques Distler 5c51f930b0 Fix another Maruku bbug
Image titles were not being output (a long-standing Maruku bug).
Also fix some broken specs. All the HTML specs pass. I hope they're
"correct".
2011-08-14 02:16:15 -05:00
Jacques Distler 070f689f9c Fixed some Maruku bugs
Email addresses and horizontal rules now work properly.
2011-08-13 03:59:40 -05:00
Jacques Distler 13a522525c REXML is dead. Long live Nokogiri.
Modify Maruku to use Nokogiri instead of REXML.
Produces a 3-fold speedup in the #to_html method.
2011-08-11 20:36:44 -05:00
Jacques Distler 201c25ce83 Small tweaks to Maruku
A real speedup could be had by redoing output/to_html.rb
2011-08-08 01:44:01 -05:00
Jacques Distler 8b008f8418 Fix Maruku Footnote Backlink
Problem reported by Shamaoke.
2011-06-18 15:54:32 -05:00
Jacques Distler 79a966f71f Fix Ordered Lists
Fix a regression in Maruku.
(Reported by Andrew Stacey.)
2011-06-09 08:30:23 -05:00
Jacques Distler c9ad2c0c6e Non-ASCII Lists
Fix a bug in Maruku's
list-parsing.

Also fix a test broken
by latest Rack + Ruby 1.9.
2011-06-01 13:17:23 -05:00
Jacques Distler f914a40fa9 Fix Maruku Math Bug
Reported by Andrew Stacey.
2010-11-27 00:43:22 -06:00
Jacques Distler f6c818de8a LaTeX Export for \array
This will work for \array without
any options.

Also fix an SVG-Edit bug
2010-10-05 21:07:19 -05:00
Jacques Distler ce8578d2d0 Some Maruku Regexp Refactoring 2010-06-19 03:02:15 -05:00
Jacques Distler 4f8759cdf3 Update vendored Sqlite3-ruby to 1.3.0
Also, some tweaks to Maruku.
2010-06-10 22:42:33 -05:00
Jacques Distler 90ad482ed2 Rename stringsupport.rb => instiki_stringsupport.rb 2010-06-09 11:47:39 -05:00
Jacques Distler 06ae79322a Maruku Cleanup Branch
Use Nathan Weizenbaum's "cleanup" branch of
Maruku. There were a few evident problems
with his branch, so please report any
anomalies you see.
2010-06-04 21:36:31 -05:00
Jacques Distler c25b608f3d Maruku's string_utils.rb
Wow! Totally un-Ruby-like.
This is more Ruby-like and
(hopefully) faster.
2010-06-02 00:15:58 -05:00
Jacques Distler b7a3b8aa94 Minor Update From Current Maruku 2010-06-01 10:39:55 -05:00
Jacques Distler 17e9cfab87 IAL's for <li> elements
Add a Markdown syntax for attaching
attribute lists to list items (for both
ordered and unordered lists).

The syntax is trivial:

1. This is the first item
2. {: value="3"} We skip straight to #3

* This is an item
* {: style="color:red"} This is a red item
2010-06-01 01:50:19 -05:00
Jacques Distler 8149c29324 More HTML5 Attribute support in Maruku 2010-05-22 15:21:06 -05:00
Jacques Distler 2781890832 Updated Sanitizer for HTML5
Sanitizer should recognize HTML elements
and attributes.

New Allowed Elements:

  article aside audio canvas command details
  dialog figcaption figure footer header
  hgroup mark meter nav progress rp rt ruby
  section source summary time video war 
       
(OK, audio and video were already there)

New Allowed Attributes:

  autocomplete contenteditable contextmenu
  draggable formaction icon low max min
  open optimum pattern placeholder preload
  pubdate required reversed  spellcheck step
  wrap

Attributes removed:

  abbr charset loopcount loopend loopstart
  noshade nowrap rev rules 


Maruku supports @start and @reversed on
ordered lists. It doesn't seem to support
IALs on li elements, so you still can't
attach @value to an li.
2010-05-22 14:34:08 -05:00
Jacques Distler c212a53ad8 Updated License from Jason
Jason's fenced codeblock code is now
BSD Licensed.
2010-01-01 21:51:01 -06:00
Jacques Distler f66fc4de4d Fenced Code Blocks, Fortran Syntax Colouring
Support Marhdown Extra's fenced code blocks. [From Jason Blevins]
Fortran syntax colouring. [From Jason Blevins]
Turn on Syntax colouring, by default.
Point to Michel Fortin's Markdown Extra page.
2009-12-31 15:54:01 -06:00
Jacques Distler 3ab7327cea Whoops! Also Update Maruku
Support syntax-colouring for
lang=css
2009-12-24 12:25:44 -06:00
Jacques Distler f7044ecbb4 Ruby 1.9.1 Fixes
Some more fixes to deal with Ruby 1.9.1.
2009-12-02 12:46:15 -06:00
Jacques Distler 063a8ca5a7 Fix Maruku Ruby 1.9 Bug
In Rbuy 1.8, ?c returns an integer.
In Ruby 1.9, it returns a 1-character
string. This was causing one of our
LaTeX conversion functional tests to
fail.
Fixed.
2009-12-01 21:29:07 -06:00
Jacques Distler 698daecf0e Maruku "Email" Header Detection
The Regexp, used in Maruku to detect "email"
headers (used, e.g., for S5 slideshow metadata)
could, for some inputs, interact badly with
Instiki's Chunk Handler.
Fixed.
2009-07-13 23:59:09 -05:00
Jacques Distler ef5878cf11 Put class name on <pre>, rather than <code>
Better CSS styling options ensue, if we put
the class='lang' on the <pre> element.

(Suggested by Casper Gripenberg)
2009-07-06 15:30:35 -05:00
Jacques Distler a84648cff1 Fix Maruku Escaping Bug
Sync with latest Maruku (now on github).
lib/maruku/ext/math/mathml_engines/none.rb should
HTML-escape the TeX source code. No it does.
2009-05-13 01:27:39 -05:00
Jacques Distler e33ccad293 Remove list.dsbl.org
The dnsbl list at list.dsbl.org is defunct.
Also: a Ruby 1.9 compatiblity tweak for Maruku.
2009-05-03 00:57:07 -05:00
Jacques Distler d425a70fad Yikes!
Yet more dangerously greedy Regexps in Maruku,
and one of my own.
2009-03-27 09:25:08 -05:00
Jacques Distler 7403ea6a6b Don't be greedy!
Maruku uses greedy Regexps in a number of places, which,
in unfavourable circumstances, can lead to exponential
slowdowns (an apparent hang).

We worked around one such bug in Revision 355. Recently,
Toby Bartels found another (in Table Header parsing).
The "real" solution seems to be to make sure the Regexps
are not greedy. (Thanks to Sam Ruby for spotting the problem!)

Reverted the workaround in Revision 355, fixed Toby's
bug, and several other similar Regexps.
2009-03-27 02:44:49 -05:00
Jacques Distler 53751a61f0 Fix Maruku Hanging Bug
A Maruku-syntax <div> with an unclosed IAL (and, it seems, at least one equation)
would cause Instiki to hang. Badly. Requiring a 'kill -9' to terminate it.
Reverting the OpenDiv and CloseDiv Regexps to my, more simple-minded, versions
fixes the problem.
2009-02-09 22:20:34 -06:00
Jacques Distler b80995dbdc Equation Numbering in Maruku+itex2MML
This was spooged by Revision #263 (to accommodate) BlahTeX/PNG support.
Hopefully this way will work in both modes.
2009-01-24 11:40:53 -06:00
Jacques Distler 5d2b0da4d5 Faster
Update dnsbl_check plugin to latest version.
Update Maruku to latest version.
In the wiki_controller, only apply the dnsbl_check before_filter 
  to the :edit, :new, and :save actions, instead of all actions.
  This makes mundane "show" requests faster, but does not 
  compromise spam-fighting ability.
2008-12-16 00:40:30 -06:00
Jacques Distler 39348c65c2 Make Andrea Happy
Use a counter, instead of rand() to aid in generating unique IDs in Maruku.
Add Unit test for the Theorem Environment.
2008-10-25 00:52:59 -05:00
Jacques Distler e48b000c11 Tweak from Ari Stern
Match Maruku Revision 184: change wrapper for embedded TeX in display equation from
a <div> to a <span>.
2008-10-23 22:44:53 -05:00
Jacques Distler 0fdb13b257 Whoops! Forgot one.
This fixes LaTeX output for Theorem cross-refs.
2008-10-21 00:26:31 -05:00
Jacques Distler 2fb41f12ce Automatic Theorem Numbering
Can now refer to numbered theorems by \ref{...}, as in LaTeX
2008-10-20 00:24:22 -05:00
Jacques Distler da81a2fbdb Fix bug in IAL detection in maruku/ext/div.rb 2008-10-17 22:34:16 -05:00
Jacques Distler 34082fbf94 Theorem Environments
Implement amsthm-like Theorem environments with Maruku.
Support is based on Maruku "div"s with special class-names.
Classes
    num_*
produce numbered environments, and

    un_*

produce un-numbered environments, where * is one of

   theorem     (for Theorem)
   lemma       (for Lemma)
   prop        (for Proposition)
   cor         (for Corollary)
   def         (for Definition)
   example     (for Example)
   remark      (for Remark)
   note        (for Note)

In addition, the class

   proof

produces a Proof environment.

The LaTeX export works as expected, and these also work in the S5 view.

Bumped version number.
2008-10-17 16:26:17 -05:00
Jacques Distler 37aff87d71 Sync with latest Maruku
Contains Ari Stern's additions for Blahtex support.
2008-08-05 13:18:23 -05:00