Forum: Redcloth RedCloth 4.2.0 released

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jason G. (Guest)
on 2009-06-10 23:39
(Received via mailing list)
Release Name: RedCloth-4.2.0

Notes:
This release makes a *significant change* to list formatting that breaks
backward compatibility but adds significant utility to styling
individual list
items. If you use formatting on bullet and numbered lists, be sure to
learn
about this change in the CHANGELOG.

Also in this release:
* Ruby 1.9 string encodings are preserved
* Table cell parsing has been enhanced to handle empty cells and cells
   containing text with line breaks
* A major regression in the handling of notextile blocks has been fixed
* There is better handling of quotes inside quoted phrases, question
marks
   inside citations, etc.
* Numerous LaTeX fixes thanks to NASA scientist Bil K..
* A pure-Ruby version of the state machine for those that absolutely
can't
   compile the C extension or use the precompiled JRuby or Win32
binaries.
   Consider yourself warned, however, that it's slow, doesn't handle
multi-byte
   strings, and isn't compatible with Ruby 1.9.  It's only provided as
a last
   resort for people who would otherwise be forced to use RedCloth
3.0.4. The
   generated ruby source is not being released to protect lazy people
from
   themselves.  If you must use it, you must build it yourself.


Changes:
Changes in RedCloth 4.2.0

* Fixed image with title, href, and text afterward not being made a
link. [Jason G.]

* Pass string encoding through in Ruby 1.9. [Jason G.]

* Allow two-letter acronyms. [Jason G.]

* Removed vertical alignment in lists. It doesn't make sense and it
conflicts with other things. [Jason G.]

* Allow table cells to be empty. [Jason G.]

* Resolve conflict between table signature and blocks beginning with
t. [Jason G.]

* Enable code signature to capture trailing space when in square
brackets. [Jason G.]

* Allow emphasized phrases to include underscores. [Jason G.]

* Include an ending question mark in a citation. [Jason G.]

* Fix <notextile> blocks being included in following paragraph. [Jason
Garber]

* Preserve leading whitespace in pre and bc blocks. [Jason G.]

* Don't add hard break after preexisting <br />. [Jason G.]

* Switched tests from Test::Unit to Rspec. [Jason G.]

* Accept multiline content in table cells. [Jason G.]

* Change to list attributes so you can give style/class to list items
(taken from PyTextile).  Breaks backwards compatibility.

   Before, the style applied to the first list item applied to the
entire list.  Now, class/id/style placed
   before the list applies to the list element and after the hash or
asterisk applies to the list item.  For
   example:
                                    <ul id="groceries">
     (#groceries)# Milk               <li>milk</li>
     # Eggs                           <li>eggs</li>
     #(optional) granola              <li class="optional">granola</li>
                                    </ul>

* Separated attributes out to have their own mark/store variable and
regs.  This way, they won't conflict with captured text or backtracked
text. [Jason G.]

* Added a RedCloth::EXTENSION_LANGUAGE constant so you can tell what
version of the parser you are using. [Jason G.]

* Added a NotCompiledError to give a friendlier message when people
just unpack RedCloth into their projects. [Jason G.]

* Added a pure-ruby version of the parser for times when you can't
compile the C or Java extensions.  You should avoid using it if at all
possible because it is 32 times slower (and has some other problems,
too)! [Jason G.]

* Ignore spaces and tabs on blank lines between blocks. #120 [Jason
Garber]

* Allow HTML tags with quoted attributes to be inside link text.  To
do this, I had to remove the possibility that attributes in HTML tags
could have spaces around the equals sign or unquoted attributes.  This
change also greatly expands the complexity of the state machine, so
compilation takes a long time. Sorry. [Jason G.]

* Many improvements to the LaTeX formatter by Bil K., a NASA
scientist who's been working with LaTeX for 20 years.  Thanks, Bil!
Kornelius K. (Guest)
on 2009-06-20 22:56
(Received via mailing list)
hello!

the latest update of RedCloth broke a feature that I was using:

$ echo '@[ruby]puts "Hello, World!"@' | redcloth _4.1.9_
<p><code lang="ruby">puts "Hello, World!"</code></p>

vs.

$ echo '@[ruby]puts "Hello, World!"@' | redcloth _4.2.0_
<p><code>[ruby]puts "Hello, World!"</code></p>

the coderay/for_redcloth extension used the old syntax to enable syntax
highlighting for @ and bc. code blocks.

feature or bug?

[murphy]
Jonathan L. (Guest)
on 2009-06-21 07:00
(Received via mailing list)
Is this a bug?

table{ font-size: 80%; }.
|_. FIELD |_. VALUE |
|Title|Mary Had a Little Lamb|

FAILS

table{ font-style: italic; }.
|_. FIELD |_. VALUE |
|Title|Mary Had a Little Lamb|

OK
Jonathan L. (Guest)
on 2009-06-21 10:09
(Received via mailing list)
also, I've started getting this warning, can't say for certain its
from my upgrade from 4.1.9 to 4.2.1 but i'm pretty sure it is.
Any ideas why?

uninitialized constant Gem::Specification::PLATFORM_CROSS_TARGETS
This topic is locked and can not be replied to.