Giter Site home page Giter Site logo

davidfstr / rdiscount Goto Github PK

View Code? Open in Web Editor NEW
757.0 21.0 70.0 500 KB

Discount (For Ruby) Implementation of John Gruber's Markdown

Home Page: http://dafoster.net/projects/rdiscount/

License: Other

Ruby 10.69% C 52.10% Perl 2.51% HTML 34.70%
markdown markdown-parser

rdiscount's Introduction

Discount Markdown Processor for Ruby

Build Status

Discount is an implementation of John Gruber's Markdown markup language in C. It implements all of the language described in the markdown syntax document and passes the Markdown 1.0 test suite.

CODE: git clone git://github.com/davidfstr/rdiscount.git
HOME: https://dafoster.net/projects/rdiscount/
DOCS: https://rdoc.info/github/davidfstr/rdiscount/master/RDiscount
BUGS: https://github.com/davidfstr/rdiscount/issues

Discount was developed by David Loren Parsons. The Ruby extension is maintained by David Foster.

INSTALL, HACKING

New releases of RDiscount are published to RubyGems:

$ [sudo] gem install rdiscount

The RDiscount sources are available via Git:

$ git clone git://github.com/davidfstr/rdiscount.git
$ cd rdiscount
$ rake --tasks

See the file BUILDING for hacking instructions.

USAGE

RDiscount implements the basic protocol popularized by RedCloth and adopted by BlueCloth:

require 'rdiscount'
markdown = RDiscount.new("Hello World!")
puts markdown.to_html

Additional processing options can be turned on when creating the RDiscount object:

markdown = RDiscount.new("Hello World!", :smart, :filter_html)

Inject RDiscount into your BlueCloth-using code by replacing your bluecloth require statements with the following:

begin
  require 'rdiscount'
  BlueCloth = RDiscount
rescue LoadError
  require 'bluecloth'
end

COPYING

Discount is free software; it is released under a BSD-style license that allows you to do as you wish with it as long as you don't attempt to claim it as your own work. RDiscount adopts Discount's license verbatim. See the file COPYING for more information.

rdiscount's People

Contributors

anatol avatar andrykonchin avatar bo98 avatar chriseppstein avatar chrisk avatar comargo avatar davidfstr avatar drothlis avatar eregon avatar fliiiix avatar geoffgarside avatar js avatar keolo avatar leereilly avatar lowjoel avatar maciejtrybilo avatar nono avatar orangejulius avatar orc avatar pixeltrix avatar rcrowley avatar rtomayko avatar segiddins avatar shirosaki avatar technoweenie avatar timfel avatar tmm1 avatar vertiginous avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rdiscount's Issues

Update to latest discount version

Could you please update the bundled version of discount to the latest available (2.1.2)?

A couple of tests should also be updated:

  1) Failure:
test_should_get_the_generated_toc(RDiscountTest) [./test/rdiscount_test.rb:57]:
<"<ul>\n <li><a href=\"#Level+1\">Level 1</a>\n  <ul>\n  <li><a href=\"#Level+2\">Level 2</a>  </li>\n  </ul>\n </li>\n </ul>"> expected but was
<"<ul>\n <li><a href=\"#Level.1\">Level 1</a></li>\n <li><ul>\n  <li><a href=\"#Level.2\">Level 2</a></li>\n </ul></li>\n</ul>">.
  2) Failure:
test_that_generate_toc_sets_toc_ids(RDiscountTest) [./test/rdiscount_test.rb:51]:
<"<h1 id=\"Level+1\">Level 1</h1>\n\n<h2 id=\"Level+2\">Level 2</h2>\n"> expected but was
<"<h1 id=\"Level.1\">Level 1</h1>\n\n<h2 id=\"Level.2\">Level 2</h2>\n">.

Cheers

Ordered and unordered lists indentation more strict than Markdown.pl

Discount does not recognize subsequent paragraphs for lists indented with zero, one, or three characters.

The following is processed by Markdown.pl as one unordered lists with two list items, the last list item having three paragraphs:

- foo bar baz

- foo

  bar

  baz

This is equivelant:

 - foo bar baz

 - foo

   bar

   baz

Discount treats it as one unordered list with two list items, the last including only the "foo" paragraph, and then "bar" and "baz" paragraphs as siblings of the unordered list.

Ordered lists have the same behavior.

Extra Pipe in Extra Table

I was trying some markdown extra.

→ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.1]
→ gem li | grep rdiscount
rdiscount (1.6.8)
→ cat extra_test.md
| a | b |
|---|---|
| c | d |
→ rdiscount extra_test.md
<table>
<thead>
<tr>
<th></th>
<th> a </th>
<th> b </th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td> c </td>
<td> d |</td>
</tr>
</tbody>
</table>

: ( why output an extra| after d ?

[feature-request] JRuby support.

RDiscount should provide a pure-ruby implementation to fall-back on, when the C Extensions cannot be used. This would allow RDiscount to be used on the JRuby platform.

Feature request: definition lists (dl/dt/dd) support

Feature request: support for Definition Lists.

I was just writing up a README.md for something, which I'm test rendering with rdiscount, and I wanted to add a definition list. Alas, the markdown syntax page doesn't list any support for these, which I presume causes them to not be supported in DISCOUNT and therefore rdiscount.

However, I do see that PHP Markdown Extra supports definition lists. So perhaps it's something that could be added (first upstream, then here) at some point?

Styles filtered automaticaly

Hi folks,

Reading the rdoc, instanciating rdiscount with no extensions should not filter styles.

But the following code

content = "Hello *github*
<style type='text/css' media='screen'>
p{margin:5px}
</style>
"
puts RDiscount.new(content).to_html

outputs

<p>Hello <em>github</em></p>

Am i doing smthing wrong ?

»mailto:« confuses autolinker

The RDiscount :autolink feature is confused by »« :

 ruby-1.9.2-head :008 > markdown = RDiscount.new("mailto:", :autolink)
 => #<RDiscount:0x00000000c78288 @text="mailto:", @autolink=true> 
ruby-1.9.2-head :009 > puts markdown.to_html
<p>mailto:</p>
 => nil 
ruby-1.9.2-head :010 > markdown = RDiscount.new("»mailto:«", :autolink)
 => #<RDiscount:0x00000000a75080 @text="»mailto:«", @autolink=true> 
ruby-1.9.2-head :011 > puts markdown.to_html
<p>»<a href="&#x6d;&#x61;&#105;&#108;&#116;&#x6f;&#58;&#xc2;&#xab;">&#xc2;&#171;</a></p>
 => nil

:smart doesn't &rsquo; "I'm"

>> RDiscount.new("I'm a don't like lookin' for you's", :smart).to_html
=> "<p>I'm a don&rsquo;t like lookin' for you&rsquo;s</p>\n"

Add options for new Discount flags

Discount got a bunch of additional functionality since this extension was original created. Most of these require a bit to be set in the flags given to discount:

  • MKD_NO_EXT - do not process psuedo-protocols
  • MKD_NOLINKS - do not allow “<a” or expand “[][]” into a link.
  • MKD_NOIMAGE - do not allow “<img” or expand “![][]” into an IMG tag.
  • MKD_NOHEADER - do not process the document header, but treat it like regular text.
  • MKD_STRICT - Disable relaxed emphasis and superscripts.
  • MKD_AUTOLINK - Greedily expand links; if a url is encountered, convert it to a hyperlink even if it isn’t surrounded with <>s
  • MKD_SAFELINK - Be paranoid about how “[][]” is expanded into a link — if the url isn’t a local reference, http://, https://, ftp://, or news://, it will not be converted into a hyperlink.
  • MKD_NOTABLES - Don’t process PHP Markdown Extra tables.

See the discount page for more info.

Quotes preceded by spaces are not formatted as quotes

Self-explanatory text snipped formatted with markdown

----start

The following renders correctly:

This is a normal paragraph.

This is a quote

Here is a list:

  • This is a list item.

This is a quote insde a list item.


The following does not render correctly:

This is a normal paragraph.

This is a quote

Here is a list:

  • This is a list item.

This is a quote insde a list item.

----eof

The second set of quotes, which are preceded by some spaces, is not rendered as quotes, and the > character gets rendered (which should not).

Gruberg formats his quotes preceded by spaces, as can be seen for example in http://daringfireball.net/2009/05/verizon_iphone_rumors.text, and his Markdown Dingus do render them as quotes, so I guess it's on specs.

Note: this issue was first posted to http://github.com/toland/qlmarkdown/issues/#issue/1 and then to http://support.github.com/discussions/gist/63-bugs-in-markdown-rendering, but both bugs seem to come from rdiscount.

Support for URL callback functions

I'd imagine a pretty common use case for RDiscount is to add, for example, ref="nofollow" to anchor tags. Discount provides URL callback functions for hooking into providing additional arguments to generated links. Can support for these callbacks be added?

Broken on Ruby 1.9.2 -- rake build - no int with size 4

Hello,

Running rake build fails on my 64-bit computer:

$ rake build
(in /home/stash/lab/rdiscount)
cd ext
/usr/bin/ruby extconf.rb
checking for random()... yes
checking for srandom()... yes
checking for rand()... yes
checking for srand()... yes
checking size of unsigned long... long
checking size of unsigned int... int
no int with size 4
*** extconf.rb failed ***

Obviously int has size 8 (bytes) on a 64-bit machine.

Thanks for your consideration.

Segfault with toc_content

Hi, I'm using rdiscount 1.6.8 and it segfaults when I use toc_content on this document :

# Portage de DLFP / LinuxFr #


La migration de _LinuxFr.org_ vers sa nouvelle version a réclamé une grande réactivité de la part de l'équipe Weboob qui n'y était pas préparée. Alors qu'elle s'attendait à trouver une version propre, certes sans API, mais en pensant que les _hacks_ de Templeet étaient loin derrière (notamment sur l'envoi de commentaires), elle a dû faire faire face à de nouveaux problèmes.


Tout d'abord, si avant il était nécessaire de conserver le couple _date + ID_ pour les dépêches et _auteur + ID_ pour les journaux en guise d'identifiants uniques, les URL sont maintenant dépourvues de tout identifiant unique autre que le titre (pour optimiser le classement dans les moteurs de recherche), ce qui rend ces URL potentiellement éphémères.
Le seul endroit où l'on peut les retrouver est le flux [[Atom]], puisqu'au sein même des pages ils y sont absents.


En outre, lors des tests sur l'envoi de commentaires, l'équipe de Weboob a réussi involontairement à faire tomber le site. En effet, la dépêche sur laquelle les tests étaient effectués s'est retrouvée depuis, et est toujours, [inaccessible](https://linuxfr.org/news/les-derniers-jeudis-de-mandraix-continuent), avec un beau message d'erreur 500.


Malgré ça, le portage est terminé, et il est maintenant possible de [_troller_ depuis son client de messagerie](https://linuxfr.org/users/moules/journaux/trollez-depuis-votre-client-mail) comme avant.
# Contributions #


L'équipe de Weboob s'est agrandie au fur et à mesure des sorties et de l'intérêt qu'il suscite dans le microcosme des vrais hommes du logiciel libre, comptant plus d'une dizaine de contributeurs réguliers ou non.


Il est aisé de venir à leur rencontre sur IRC ([#weboob](irc://irc.freenode.net/weboob) sur [Freenode](http://www.freenode.net)) ou par le biais de la [liste de diffusion](http://lists.symlink.me/mailman/listinfo/weboob), ou de participer aux [soirées Weboob](http://people.symlink.me/~rom1/events/).


Grâce à la documentation et à l'expertise des développeurs du projet, vous pouvez vous aussi développer en toute simplicité, avec des notions de Python, un nouveau _backend_ pour votre site web préféré qui sera dès lors utilisable par toutes les applications supportant les [capacités](http://weboob.org/Capabilities) que vous implémenterez.
Inversement, si l'IHM est votre truc, vous pouvez développer une nouvelle application en console, graphique ou pour téléphone portable, en vous reposant sur les nombreux _backends_ existants sans avoir vous occuper de la communication avec les sites.


# Futur #


Outre la volonté de toujours multiplier le nombre de sites web supportés, le développement va s'articuler, pour les mois à venir, autour d'une volonté de se libérer du langage Python.


Cela va passer par la réécriture du cœur de Weboob (qui ne fait qu'une centaine de lignes) en C, afin, d'une part, de pouvoir charger les _backends_ écrits en Python, mais également dans d'autres langages, et d'autre part, de fournir des _bindings_ dans ces mêmes autres langages, afin de rendre accessible Weboob à des applications déjà existantes écrites dans d'autres langages.


L'idée est que si les compétences de _boobisation_ de sites web sont là, il vaut mieux déléguer la présentation et le traitement des données à de véritables applications qui sauront profiter de la valeur ajoutée de Weboob.
# Changements #


## Général ##


* Nouveaux _backends_ :
  * [Bouygues](http://weboob.org/Bouygues) ([CapMessagesPost](http://weboob.org/CapMessagesPost)).
  * [CanalPlus](http://weboob.org/CanalPlus) ([CapVideo](http://weboob.org/CapVideo)).
  * [CreditMutuel](http://weboob.org/CreditMutuel) ([CapBank](http://weboob.org/CapBank)).
  * [Inrocks](http://weboob.org/Inrocks) ([CapMessages](http://weboob.org/CapMessages)).
  * [IPInfoDB](http://weboob.org/IPInfoDB) ([CapGeolocIp](http://weboob.org/CapGeolocIp)).
  * [IsoHunt](http://weboob.org/IsoHunt) ([CapTorrent](http://weboob.org/CapTorrent)).
  * [KickAss](http://weboob.org/KickAss) ([CapTorrent](http://weboob.org/CapTorrent)).
  * [LeFigaro](http://weboob.org/LeFigaro) ([CapMessages](http://weboob.org/CapMessages)).
  * [MediaWiki](http://weboob.org/MediaWiki) ([CapContent](http://weboob.org/CapContent)).
  * [Minutes20](http://weboob.org/Minutes20) ([CapMessages](http://weboob.org/CapMessages)).
  * [MeteoFrance](http://weboob.org/MeteoFrance) ([CapWeather](http://weboob.org/CapWeather)).
  * [Orange](http://weboob.org/Orange) ([CapMessages](http://weboob.org/CapMessages), [CapMessagesPost](http://weboob.org/CapMessagesPost)).
  * [PirateBay](http://weboob.org/PirateBay) ([CapTorrent](http://weboob.org/CapTorrent)).
  * [SFR](http://weboob.org/SFR) ([CapMessagesPost](http://weboob.org/CapMessagesPost)).
  * [SocieteGenerale](http://weboob.org/SocieteGenerale) ([CapBank](http://weboob.org/CapBank)).
* Nouvelles applications :
  * [boobmsg](http://weboob.org/boobmsg) ([CapMessages](http://weboob.org/CapMessages), [CapMessagesPost](http://weboob.org/CapMessagesPost)).
  * [QWebContentEdit](http://weboob.org/QWebContentEdit) ([CapContent](http://weboob.org/CapContent)).
* Un nouvel outil, `« make_man.py »`, a été créé pour générer les pages de manuel (_manpages_).


## Applications consoles ##
* Nouvelle commande `« inspect »` pour ouvrir un navigateur _webkit_ graphique avec la page courante (afin d'aider à déboguer). S'il n'est pas disponible, affiche la source de la page sur la sortie standard.
* Dans les _prompts_, afficher une liste à puces quand il y a trop de choix.
* Le paramètre « **--save-responses** » (« **-a** ») sauvegarde maintenant les pages dans un répertoire et conserve la journalisation, ainsi qu'une liste d'association des URL visitées.
* Correction de problèmes Unicode ([#436](http://weboob.org/issues/436)).
* Nouveau paramètre « -O » pour définir un fichier en sortie.


## Backend : [AuM](http://weboob.org/AuM) ##
* Ne pas envoyer de notification de panier des filles qui ont quitté le site.
* Mise à jour de l'« anti-pourriel ».
* Notifie l'utilisateur lorsqu'il est banni.
* Nouvelle optimisation `PRIORITY_CONNECTION` pour créer des faux comptes filleuls afin de pouvoir accéder au site entre 18 h et 1 h. ([#319](http://weboob.org/issues/319))
*  Nouvelle optimisation `QUERIES_QUEUE` pour mettre en file d'attente les requêtes lorsque qu'il n'y a plus de charme disponible.
* Nouveau paramètre `« baskets »` pour activer la réception des notifications de paniers.
* Affichage des photos cachées ou supprimées dans les profils.
* Correction : changement du site web, `« mails.php »` a été renommé en `« mail.php »`.


## Backend : [BNPorc](http://weboob.org/BNPorc) ##
* Correction : affichage des opérations à venir.
* Correction : vérification du succès de la rotation du mot de passe.
* Correction : la captcha a été changée sur le site web ([#461](http://weboob.org/issues/461)).


## Backend : [BP](http://weboob.org/BP) ##
* Réécriture pour utiliser BaseBrowser ([#422](http://weboob.org/issues/422)).
* Correction : initialisation du _backend_.
* Correction : gestion des erreurs de transferts.


## Backend : [CrAgr](http://weboob.org/CrAgr) ##
* Affichage de l'historique des opérations.
* Support des transferts d'argent.
* Choix du site web de l'agence dans une liste.
* Correction : ne pas conserver la liste des comptes en cache.
* Correction : support des transactions supérieures à 999 € et des négatives.
* Correction : calcul des centimes.


## Backend : [DLFP](http://weboob.org/DLFP) ##
* Support de la [nouvelle version](http://linuxfr.org/news/nouvelle-version-de-linuxfrorg--2) de _LinuxFr.org_. ([#503](http://weboob.org/issues/503))
* Clôture de la session lors de la « désinitialisation » de Weboob.


## Backend : [GeolocIP](http://weboob.org/GeolocIP) ##
* Utilisation du site web _www.geolocip.com_ à la place de _www.geolocalise-ip.com_.
Cela évite de nécessiter une authentification.


## Backend : [INA](http://weboob.org/INA) ##
* Correction : analyse des dates, des durées et des titres.


## Backend : [OuiFM](http://weboob.org/OuiFM) ##
* Correction : le site web a changé pour la récupération de la chanson actuelle.


## Backend : [Redmine](http://weboob.org/Redmine) ##
* Ajout du support de prévisualisation des modifications.
* Correction : détection lorsque le nom d'utilisateur ou le mot de passe sont invalides.


## Backend : [Yahoo](http://weboob.org/Yahoo) ##
* Correction : ne se lançait plus avec Python < 2.6.
* La commande `« search »` est maintenant implémentée.


## Backend : [Youtube](http://weboob.org/Youtube) ##
* Correction : changement du site web ([#450](http://weboob.org/issues/450)).


## Application : [boobank-munin](http://weboob.org/Boobank#Monitor-accounts-with-Munin) ##
* Sauvegarde du cache dans `« .weboob/munin/ »` et gestion des erreurs.
* Nouvelle option `« boobank_cumulate »` pour afficher les graphes comme des aires, plutôt que comme des courbes.


## Application : [havesex](http://weboob.org/havesex) ##
* La gestion des optimisations a été réécrite.
* Nouvelle commande `« query »` pour envoyer une requête à un contact (tel qu'un charme).
* Correction : ne pas quitter après avoir affiché un profil en mode interactif.


## Application : [monboob](http://weboob.org/monboob) ##
* Nouvelle option pour rediriger, via un tube (_pipe_), les e-mails vers un processus externe plutôt que de les envoyer à un serveur SMTP.
* Correction : problèmes d'encodage.


## Application : [QBoobMsg](http://weboob.org/QBoobMsg) ##
* Correction : rechargement de la liste des _backends_.


## Application : [QHaveSex](http://weboob.org/QHaveSex) ##
* Affiche l'URL des contacts.
* La liste des contacts est maintenant triée.
* Présente les photos sous forme de carrousel sur la page des profils.


## Application : [videoob](http://weboob.org/videoob) ##
* Correction : lecture des vidéos dans certains cas ([#446](http://weboob.org/issues/446)).


## Application : [webcontentedit](http://weboob.org/webcontentedit) ##
* Nouvelle commande `« log »` pour afficher toutes les révisions d'une page.


## Application : [weboob-config](http://weboob.org/Backends_Configuration#weboob-config) ##
* Nouvelle commande `« confirm »`. Elle prend un e-mail en entrée et appelle le _backend_ correspondant
pour aller sur l'adresse de confirmation. C'est utile pour automatiquement confirmer une inscription.
* La commande `« edit »` permet maintenant d'éditer interactivement un _backend_, plutôt que d'ouvrir le fichier `« ~/.weboob/backends »` avec un éditeur de texte.


## Application : [weboob-config-qt](http://weboob.org/Backends_Configuration#weboob-config-qt) ##
* Correction : plantage lors de l'ajout d'un _backend_ déjà existant.


## Application : [weboorrents](http://weboob.org/weboorrents) ##
* Complètement automatique des chemins d'accès.


## Application : [wetboobs](http://weboob.org/Wetboobs) ##
* Réécriture pour utiliser les formateurs.

The backtrace is:

/data/prod/linuxfr/production/releases/20110313013344/lib/lfmarkdown.rb:80: [BUG] Segmentation fault
ruby 1.9.2p180 (2011-02-18 revision 30909) [i486-linux]

-- control frame ----------
c:0150 p:---- s:0669 b:0669 l:000668 d:000668 CFUNC  :toc_content
c:0149 p:0011 s:0666 b:0666 l:000665 d:000665 METHOD /data/prod/linuxfr/production/releases/20110313013344/lib/lfmarkdown.rb:80
c:0148 p:0078 s:0662 b:0662 l:000661 d:000661 METHOD /data/prod/linuxfr/production/releases/20110313013344/lib/lfmarkdown.rb:34
c:0147 p:0027 s:0658 b:0658 l:000657 d:000657 METHOD /data/prod/linuxfr/production/releases/20110313013344/lib/ar_base_ext.rb:61
c:0146 p:0077 s:0653 b:0651 l:000650 d:000650 METHOD /data/prod/linuxfr/production/releases/20110313013344/app/models/news.rb:153
c:0145 p:0189 s:0648 b:0648 l:000647 d:000647 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.5/lib/active_support/callbacks.rb:421
c:0144 p:0011 s:0639 b:0639 l:00204c d:00204c METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activemodel-3.0.5/lib/active_model/validations/callbacks.rb:67
c:0143 p:0059 s:0636 b:0636 l:000635 d:000635 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activemodel-3.0.5/lib/active_model/validations.rb:179
c:0142 p:0048 s:0631 b:0631 l:000630 d:000630 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/validations.rb:55
c:0141 p:0011 s:0626 b:0626 l:001124 d:000625 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/integrations/active_model.rb:
c:0140 p:0016 s:0624 b:0624 l:000617 d:000623 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:149
c:0139 p:0009 s:0621 b:0621 l:000620 d:000620 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:169
c:0138 p:0011 s:0618 b:0618 l:000617 d:000617 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:147
c:0137 p:0086 s:0615 b:0615 l:000614 d:000614 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:132
c:0136 p:0084 s:0609 b:0609 l:000608 d:000608 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:222
c:0135 p:0019 s:0605 b:0605 l:001b50 d:000604 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:127
c:0134 p:0153 s:0603 b:0602 l:000601 d:000601 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition.rb:356
c:0133 p:0019 s:0594 b:0594 l:000578 d:000593 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition.rb:188
c:0132 p:0005 s:0592 b:0592 l:000583 d:000591 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition.rb:279
c:0131 p:---- s:0590 b:0590 l:000589 d:000589 FINISH
c:0130 p:---- s:0588 b:0588 l:000587 d:000587 CFUNC  :catch
c:0129 p:0015 s:0584 b:0584 l:000583 d:000583 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition.rb:279
c:0128 p:0040 s:0579 b:0579 l:000578 d:000578 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition.rb:188
c:0127 p:0045 s:0573 b:0573 l:001b50 d:001b50 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:126
c:0126 p:0038 s:0567 b:0567 l:000566 d:000566 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:211
c:0125 p:0012 s:0563 b:0563 l:000549 d:000562 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:63
c:0124 p:---- s:0561 b:0561 l:000560 d:000560 FINISH
c:0123 p:---- s:0559 b:0559 l:000558 d:000558 CFUNC  :catch
c:0122 p:0011 s:0555 b:0555 l:000549 d:000554 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:63
c:0121 p:0046 s:0553 b:0553 l:000552 d:000552 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:185
c:0120 p:0076 s:0550 b:0550 l:000549 d:000549 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:62
c:0119 p:0037 s:0546 b:0546 l:001124 d:0005d4 LAMBDA /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/integrations/active_model.rb:
c:0118 p:---- s:0542 b:0542 l:000541 d:000541 FINISH
c:0117 p:0130 s:0540 b:0540 l:000539 d:000539 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/validations.rb:75
c:0116 p:0017 s:0535 b:0535 l:000534 d:000534 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/validations.rb:43
c:0115 p:0012 s:0531 b:0531 l:000530 d:000530 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/attribute_methods/dirty.rb:21
c:0114 p:0010 s:0526 b:0526 l:001d78 d:000525 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/transactions.rb:240
c:0113 p:0015 s:0524 b:0524 l:001358 d:000523 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/transactions.rb:292
c:0112 p:0232 s:0522 b:0522 l:000521 d:000521 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/d
c:0111 p:0025 s:0513 b:0513 l:000512 d:000512 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/transactions.rb:207
c:0110 p:0022 s:0508 b:0508 l:001358 d:001358 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/transactions.rb:290
c:0109 p:0009 s:0504 b:0504 l:001d78 d:0025bc BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/transactions.rb:240
c:0108 p:0017 s:0502 b:0502 l:000501 d:000501 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/transactions.rb:251
c:0107 p:0011 s:0499 b:0499 l:001d78 d:001d78 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/transactions.rb:239
c:0106 p:0042 s:0495 b:0492 l:000477 d:000491 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:153
c:0105 p:---- s:0489 b:0489 l:000488 d:000488 FINISH
c:0104 p:---- s:0487 b:0487 l:000486 d:000486 CFUNC  :each
c:0103 p:0067 s:0484 b:0484 l:000477 d:000483 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:153
c:0102 p:0009 s:0481 b:0481 l:000480 d:000480 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:169
c:0101 p:0011 s:0478 b:0478 l:000477 d:000477 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:147
c:0100 p:0064 s:0475 b:0475 l:000474 d:000474 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:60
c:0099 p:0082 s:0471 b:0471 l:000470 d:000470 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition.rb:162
c:0098 p:0048 s:0466 b:0466 l:000465 d:000465 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/event.rb:207
c:0097 p:0030 s:0460 b:0460 l:00070c d:000459 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/event.rb:258
c:0096 p:---- s:0455 b:0455 l:000454 d:000454 FINISH
c:0095 p:---- s:0453 b:0453 l:000452 d:000452 CFUNC  :call
c:0094 p:0031 s:0448 b:0448 l:000a80 d:000447 LAMBDA /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/machine.rb:537
c:0093 p:---- s:0445 b:0445 l:000444 d:000444 FINISH
c:0092 p:0021 s:0443 b:0443 l:00070c d:000442 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/event.rb:263
c:0091 p:---- s:0438 b:0438 l:000437 d:000437 FINISH
c:0090 p:---- s:0436 b:0436 l:000435 d:000435 CFUNC  :call
c:0089 p:0031 s:0431 b:0431 l:000be8 d:000430 LAMBDA /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/machine.rb:537
c:0088 p:---- s:0428 b:0428 l:000427 d:000427 FINISH
c:0087 p:0011 s:0426 b:0426 l:000425 d:000425 METHOD /data/prod/linuxfr/production/releases/20110313013344/app/models/news.rb:90
c:0086 p:0033 s:0421 b:0421 l:000420 d:000420 METHOD /data/prod/linuxfr/production/releases/20110313013344/app/controllers/redaction/news_controller.rb:42
c:0085 p:0012 s:0418 b:0418 l:000417 d:000417 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_controller/metal/implicit_render.rb:4
c:0084 p:0015 s:0413 b:0413 l:000412 d:000412 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/abstract_controller/base.rb:150
c:0083 p:0041 s:0408 b:0408 l:000407 d:000407 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_controller/metal/rendering.rb:11
c:0082 p:0012 s:0404 b:0404 l:0019f4 d:000403 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/abstract_controller/callbacks.rb:18
c:0081 p:0153 s:0402 b:0402 l:000401 d:000401 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.5/lib/active_support/callbacks.rb:450
c:0080 p:0113 s:0396 b:0396 l:000395 d:000395 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.5/lib/active_support/callbacks.rb:409
c:0079 p:0024 s:0387 b:0387 l:000386 d:000386 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.5/lib/active_support/callbacks.rb:93
c:0078 p:0015 s:0381 b:0381 l:0019f4 d:0019f4 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/abstract_controller/callbacks.rb:17
c:0077 p:0012 s:0376 b:0376 l:000357 d:000375 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_controller/metal/instrumentation.rb:30
c:0076 p:0017 s:0372 b:0372 l:000362 d:000371 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.5/lib/active_support/notifications.rb:52
c:0075 p:0032 s:0370 b:0370 l:000369 d:000369 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.5/lib/active_support/notifications/instrumenter.r
c:0074 p:0036 s:0363 b:0363 l:000362 d:000362 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.5/lib/active_support/notifications.rb:52
c:0073 p:0152 s:0358 b:0358 l:000357 d:000357 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_controller/metal/instrumentation.rb:29
c:0072 p:0012 s:0352 b:0352 l:000351 d:000351 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_controller/metal/rescue.rb:17
c:0071 p:0093 s:0347 b:0347 l:000346 d:000346 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/abstract_controller/base.rb:119
c:0070 p:0084 s:0341 b:0341 l:000340 d:000340 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/abstract_controller/rendering.rb:41
c:0069 p:0048 s:0336 b:0336 l:000335 d:000335 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_controller/metal.rb:138
c:0068 p:0086 s:0331 b:0331 l:000330 d:000330 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_controller/metal/rack_delegation.rb:14
c:0067 p:0030 s:0325 b:0325 l:001034 d:000324 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_controller/metal.rb:178
c:0066 p:---- s:0322 b:0322 l:000321 d:000321 FINISH
c:0065 p:---- s:0320 b:0320 l:000319 d:000319 CFUNC  :call
c:0064 p:0022 s:0316 b:0316 l:000315 d:000315 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/routing/route_set.rb:62
c:0063 p:0094 s:0310 b:0310 l:000309 d:000309 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/routing/route_set.rb:27
c:0062 p:0097 s:0304 b:0304 l:000276 d:000303 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-mount-0.6.13/lib/rack/mount/route_set.rb:148
c:0061 p:0014 s:0298 b:0298 l:000282 d:000297 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-mount-0.6.13/lib/rack/mount/code_generation.rb:93
c:0060 p:0356 s:0293 b:0293 l:000292 d:000292 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-mount-0.6.13/lib/rack/mount/code_generation.rb:75
c:0059 p:0198 s:0283 b:0283 l:000282 d:000282 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-mount-0.6.13/lib/rack/mount/code_generation.rb:92
c:0058 p:0092 s:0277 b:0277 l:000276 d:000276 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-mount-0.6.13/lib/rack/mount/route_set.rb:139
c:0057 p:0025 s:0271 b:0271 l:000270 d:000270 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/routing/route_set.rb:492
c:0056 p:0033 s:0267 b:0267 l:000266 d:000266 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/haml-3.0.25/lib/sass/plugin/rack.rb:41
c:0055 p:0014 s:0263 b:0263 l:000254 d:000262 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/warden-1.0.3/lib/warden/manager.rb:35
c:0054 p:---- s:0261 b:0261 l:000260 d:000260 FINISH
c:0053 p:---- s:0259 b:0259 l:000258 d:000258 CFUNC  :catch
c:0052 p:0086 s:0255 b:0255 l:000254 d:000254 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/warden-1.0.3/lib/warden/manager.rb:34
c:0051 p:0015 s:0250 b:0250 l:000249 d:000249 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/best_standards_supp
c:0050 p:0093 s:0243 b:0243 l:000242 d:000242 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/head.rb:14
c:0049 p:0155 s:0236 b:0236 l:000235 d:000235 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/methodoverride.rb:24
c:0048 p:0046 s:0230 b:0230 l:000229 d:000229 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/params_parser.rb:21
c:0047 p:0054 s:0225 b:0225 l:000224 d:000224 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/flash.rb:182
c:0046 p:0027 s:0218 b:0218 l:000217 d:000217 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/session/abstract_st
c:0045 p:0015 s:0207 b:0207 l:000206 d:000206 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/cookies.rb:302
c:0044 p:0014 s:0199 b:0199 l:001440 d:000198 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/query_cache.rb:32
c:0043 p:0019 s:0197 b:0197 l:000196 d:000196 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/q
c:0042 p:0051 s:0193 b:0193 l:000192 d:000192 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/query_cache.rb:12
c:0041 p:0019 s:0189 b:0189 l:001440 d:001440 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/query_cache.rb:31
c:0040 p:0015 s:0185 b:0185 l:000184 d:000184 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/c
c:0039 p:0029 s:0181 b:0181 l:001400 d:000180 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/callbacks.rb:46
c:0038 p:0155 s:0179 b:0179 l:000178 d:000178 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.5/lib/active_support/callbacks.rb:415
c:0037 p:0011 s:0169 b:0169 l:001400 d:001400 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/callbacks.rb:44
c:0036 p:0015 s:0165 b:0165 l:000164 d:000164 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/sendfile.rb:107
c:0035 p:0049 s:0155 b:0155 l:000154 d:000154 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/remote_ip.rb:48
c:0034 p:0017 s:0151 b:0151 l:000150 d:000150 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/show_exceptions.rb:
c:0033 p:0027 s:0143 b:0143 l:000142 d:000142 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/railties-3.0.5/lib/rails/rack/logger.rb:13
c:0032 p:0032 s:0139 b:0139 l:000138 d:000138 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/runtime.rb:17
c:0031 p:0014 s:0130 b:0130 l:000124 d:000129 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/lock.rb:11
c:0030 p:0019 s:0128 b:0128 l:000127 d:000127 METHOD :10
c:0029 p:0054 s:0125 b:0125 l:000124 d:000124 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/lock.rb:11
c:0028 p:0032 s:0120 b:0120 l:000119 d:000119 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/railties-3.0.5/lib/rails/application.rb:168
c:0027 p:0021 s:0116 b:0116 l:000115 d:000115 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/railties-3.0.5/lib/rails/application.rb:77
c:0026 p:---- s:0111 b:0111 l:000110 d:000110 FINISH
c:0025 p:0103 s:0109 b:0109 l:001038 d:001038 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/lint.rb:48
c:0024 p:0022 s:0103 b:0103 l:000102 d:000102 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/lint.rb:36
c:0023 p:0015 s:0099 b:0099 l:000098 d:000098 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/showexceptions.rb:24
c:0022 p:0032 s:0093 b:0093 l:000092 d:000092 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/commonlogger.rb:18
c:0021 p:0027 s:0085 b:0085 l:000084 d:000084 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:531
c:0020 p:0029 s:0076 b:0076 l:000334 d:000075 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:606
c:0019 p:---- s:0072 b:0072 l:000071 d:000071 FINISH
c:0018 p:---- s:0070 b:0070 l:000069 d:000069 CFUNC  :each
c:0017 p:0204 s:0067 b:0067 l:000334 d:000334 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:604
c:0016 p:0048 s:0056 b:0056 l:000037 d:000055 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:495
c:0015 p:---- s:0054 b:0054 l:000053 d:000053 FINISH
c:0014 p:---- s:0052 b:0052 l:000051 d:000051 CFUNC  :fork
c:0013 p:0104 s:0049 b:0047 l:000037 d:000046 BLOCK  /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:492
c:0012 p:---- s:0043 b:0043 l:000042 d:000042 FINISH
c:0011 p:---- s:0041 b:0041 l:000040 d:000040 CFUNC  :each
c:0010 p:0023 s:0038 b:0038 l:000037 d:000037 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:488
c:0009 p:0058 s:0035 b:0035 l:000034 d:000034 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:502
c:0008 p:0347 s:0031 b:0031 l:000030 d:000030 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:297
c:0007 p:0039 s:0024 b:0024 l:000023 d:000023 METHOD /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn.rb:13
c:0006 p:0233 s:0019 b:0019 l:001674 d:001674 TOP    /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/bin/unicorn:120
c:0005 p:---- s:0013 b:0013 l:000012 d:000012 FINISH
c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC  :load
c:0003 p:0127 s:0007 b:0007 l:0007cc d:001bd8 EVAL   /data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/bin/unicorn:19
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0007cc d:0007cc TOP   
---------------------------
-- Ruby level backtrace information ----------------------------------------
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/bin/unicorn:19:in `'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/bin/unicorn:19:in `load'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/bin/unicorn:120:in `'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn.rb:13:in `run'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:297:in `join'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:502:in `maintain_worker_count'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:488:in `spawn_missing_workers'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:488:in `each'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:492:in `block in spawn_missing_workers'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:492:in `fork'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:495:in `block (2 levels) in spawn_missing_workers'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:604:in `worker_loop'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:604:in `each'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:606:in `block in worker_loop'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/unicorn-3.4.0/lib/unicorn/http_server.rb:531:in `process_client'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/commonlogger.rb:18:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/showexceptions.rb:24:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/lint.rb:36:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/lint.rb:48:in `_call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/railties-3.0.5/lib/rails/application.rb:77:in `method_missing'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/railties-3.0.5/lib/rails/application.rb:168:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/lock.rb:11:in `call'
:10:in `synchronize'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/lock.rb:11:in `block in call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/runtime.rb:17:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/railties-3.0.5/lib/rails/rack/logger.rb:13:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/sendfile.rb:107:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/callbacks.rb:44:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.5/lib/active_support/callbacks.rb:415:in `_run_call_callbacks'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/callbacks.rb:46:in `block in call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:354:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/query_cache.rb:31:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/query_cache.rb:12:in `cache'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/query_cache.rb:32:in `block in call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/cookies.rb:302:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/flash.rb:182:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/methodoverride.rb:24:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/head.rb:14:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/warden-1.0.3/lib/warden/manager.rb:34:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/warden-1.0.3/lib/warden/manager.rb:34:in `catch'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/warden-1.0.3/lib/warden/manager.rb:35:in `block in call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/haml-3.0.25/lib/sass/plugin/rack.rb:41:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/routing/route_set.rb:492:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-mount-0.6.13/lib/rack/mount/route_set.rb:139:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-mount-0.6.13/lib/rack/mount/code_generation.rb:92:in `recognize'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-mount-0.6.13/lib/rack/mount/code_generation.rb:75:in `optimized_each'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-mount-0.6.13/lib/rack/mount/code_generation.rb:93:in `block in recognize'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rack-mount-0.6.13/lib/rack/mount/route_set.rb:148:in `block in call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/routing/route_set.rb:27:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/routing/route_set.rb:62:in `dispatch'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/routing/route_set.rb:62:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_controller/metal.rb:178:in `block in action'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_controller/metal.rb:138:in `dispatch'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/abstract_controller/rendering.rb:41:in `process'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/abstract_controller/base.rb:119:in `process'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_controller/metal/rescue.rb:17:in `process_action'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.5/lib/active_support/notifications.rb:52:in `instrument'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.5/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.5/lib/active_support/notifications.rb:52:in `block in instrument'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/abstract_controller/callbacks.rb:17:in `process_action'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.5/lib/active_support/callbacks.rb:93:in `run_callbacks'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.5/lib/active_support/callbacks.rb:409:in `_run_process_action_callbacks'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.5/lib/active_support/callbacks.rb:450:in `_run__294997374__process_action__691168735__callbacks'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_controller/metal/rendering.rb:11:in `process_action'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/abstract_controller/base.rb:150:in `process_action'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/actionpack-3.0.5/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/data/prod/linuxfr/production/releases/20110313013344/app/controllers/redaction/news_controller.rb:42:in `submit'
/data/prod/linuxfr/production/releases/20110313013344/app/models/news.rb:90:in `submit_and_notify'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/machine.rb:537:in `block (2 levels) in define_instance_method'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/machine.rb:537:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/event.rb:263:in `block in add_actions'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/machine.rb:537:in `block (2 levels) in define_instance_method'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/machine.rb:537:in `call'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/event.rb:258:in `block in add_actions'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/event.rb:207:in `fire'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition.rb:162:in `perform'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:60:in `perform'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:147:in `run_actions'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:169:in `catch_exceptions'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:153:in `block in run_actions'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:153:in `each'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:153:in `block (2 levels) in run_actions'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/transactions.rb:239:in `save'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/transactions.rb:251:in `rollback_active_record_state!'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/transactions.rb:240:in `block in save'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/transactions.rb:290:in `with_transaction_returning_status'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/transactions.rb:207:in `transaction'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/transactions.rb:292:in `block in with_transaction_returning_status'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/transactions.rb:240:in `block (2 levels) in save'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/attribute_methods/dirty.rb:21:in `save'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/validations.rb:43:in `save'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/validations.rb:75:in `perform_validations'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/integrations/active_model.rb:372:in `block (2 levels) in define_action_helpers'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:62:in `perform'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:185:in `within_transaction'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:63:in `block in perform'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:63:in `catch'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:63:in `block (2 levels) in perform'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:211:in `run_callbacks'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:126:in `run_callbacks'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition.rb:188:in `run_callbacks'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition.rb:279:in `pausable'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition.rb:279:in `catch'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition.rb:279:in `block in pausable'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition.rb:188:in `block in run_callbacks'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition.rb:356:in `before'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:127:in `block in run_callbacks'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:222:in `run_callbacks'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:132:in `run_callbacks'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:147:in `run_actions'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:169:in `catch_exceptions'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/transition_collection.rb:149:in `block in run_actions'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/state_machine-0.9.4/lib/state_machine/integrations/active_model.rb:372:in `block (3 levels) in define_action_helpers'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activerecord-3.0.5/lib/active_record/validations.rb:55:in `valid?'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activemodel-3.0.5/lib/active_model/validations.rb:179:in `valid?'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activemodel-3.0.5/lib/active_model/validations/callbacks.rb:67:in `run_validations!'
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.5/lib/active_support/callbacks.rb:421:in `_run_validation_callbacks'
/data/prod/linuxfr/production/releases/20110313013344/app/models/news.rb:153:in `wikify_fields'
/data/prod/linuxfr/production/releases/20110313013344/lib/ar_base_ext.rb:61:in `wikify'
/data/prod/linuxfr/production/releases/20110313013344/lib/lfmarkdown.rb:34:in `to_html'
/data/prod/linuxfr/production/releases/20110313013344/lib/lfmarkdown.rb:80:in `add_toc_content'
/data/prod/linuxfr/production/releases/20110313013344/lib/lfmarkdown.rb:80:in `toc_content'

-- C level backtrace information -------------------------------------------
/usr/lib/libruby-1.9.1.so.1.9(rb_vm_bugreport+0x72) [0xb7e7f812]
/usr/lib/libruby-1.9.1.so.1.9(+0x4fe31) [0xb7d79e31]
/usr/lib/libruby-1.9.1.so.1.9(rb_bug+0x3a) [0xb7d79eca]
/usr/lib/libruby-1.9.1.so.1.9(+0xef59c) [0xb7e1959c]
[0xb7ef8440]
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rdiscount-1.6.8/lib/rdiscount.so(+0x4e92) [0xb7409e92]
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rdiscount-1.6.8/lib/rdiscount.so(+0x5580) [0xb740a580]
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rdiscount-1.6.8/lib/rdiscount.so(+0x3efb) [0xb7408efb]
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rdiscount-1.6.8/lib/rdiscount.so(___mkd_reparse+0xd0) [0xb74094d0]
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rdiscount-1.6.8/lib/rdiscount.so(Csreparse+0x4e) [0xb740c36e]
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rdiscount-1.6.8/lib/rdiscount.so(mkd_toc+0x1ee) [0xb740cf5e]
/data/prod/linuxfr/production/shared/bundle/ruby/1.9.1/gems/rdiscount-1.6.8/lib/rdiscount.so(+0x8e97) [0xb740de97]
/usr/lib/libruby-1.9.1.so.1.9(+0x13fd28) [0xb7e69d28]
/usr/lib/libruby-1.9.1.so.1.9(+0x14e249) [0xb7e78249]
/usr/lib/libruby-1.9.1.so.1.9(+0x145889) [0xb7e6f889]
/usr/lib/libruby-1.9.1.so.1.9(+0x14baee) [0xb7e75aee]
/usr/lib/libruby-1.9.1.so.1.9(+0x15113f) [0xb7e7b13f]
/usr/lib/libruby-1.9.1.so.1.9(rb_catch_obj+0xc7) [0xb7e698a7]
/usr/lib/libruby-1.9.1.so.1.9(+0x141356) [0xb7e6b356]
/usr/lib/libruby-1.9.1.so.1.9(+0x13fd28) [0xb7e69d28]
/usr/lib/libruby-1.9.1.so.1.9(+0x14e249) [0xb7e78249]
/usr/lib/libruby-1.9.1.so.1.9(+0x145889) [0xb7e6f889]
/usr/lib/libruby-1.9.1.so.1.9(+0x14baee) [0xb7e75aee]
/usr/lib/libruby-1.9.1.so.1.9(+0x15113f) [0xb7e7b13f]
/usr/lib/libruby-1.9.1.so.1.9(rb_catch_obj+0xc7) [0xb7e698a7]
/usr/lib/libruby-1.9.1.so.1.9(+0x141356) [0xb7e6b356]
/usr/lib/libruby-1.9.1.so.1.9(+0x13fd28) [0xb7e69d28]
/usr/lib/libruby-1.9.1.so.1.9(+0x14e249) [0xb7e78249]
/usr/lib/libruby-1.9.1.so.1.9(+0x145889) [0xb7e6f889]
/usr/lib/libruby-1.9.1.so.1.9(+0x14baee) [0xb7e75aee]
/usr/lib/libruby-1.9.1.so.1.9(rb_vm_invoke_proc+0x314) [0xb7e77d04]
/usr/lib/libruby-1.9.1.so.1.9(+0x14dfb7) [0xb7e77fb7]
/usr/lib/libruby-1.9.1.so.1.9(+0x145889) [0xb7e6f889]
/usr/lib/libruby-1.9.1.so.1.9(+0x14baee) [0xb7e75aee]
/usr/lib/libruby-1.9.1.so.1.9(rb_yield+0x22f) [0xb7e7b77f]
/usr/lib/libruby-1.9.1.so.1.9(rb_ary_each+0x52) [0xb7d4d542]
/usr/lib/libruby-1.9.1.so.1.9(+0x13fd0d) [0xb7e69d0d]
/usr/lib/libruby-1.9.1.so.1.9(+0x14e249) [0xb7e78249]
/usr/lib/libruby-1.9.1.so.1.9(+0x145889) [0xb7e6f889]
/usr/lib/libruby-1.9.1.so.1.9(+0x14baee) [0xb7e75aee]
/usr/lib/libruby-1.9.1.so.1.9(rb_vm_invoke_proc+0x314) [0xb7e77d04]
/usr/lib/libruby-1.9.1.so.1.9(+0x57b23) [0xb7d81b23]
/usr/lib/libruby-1.9.1.so.1.9(+0x13fd28) [0xb7e69d28]
/usr/lib/libruby-1.9.1.so.1.9(+0x14e249) [0xb7e78249]
/usr/lib/libruby-1.9.1.so.1.9(+0x145889) [0xb7e6f889]
/usr/lib/libruby-1.9.1.so.1.9(+0x14baee) [0xb7e75aee]
/usr/lib/libruby-1.9.1.so.1.9(rb_vm_invoke_proc+0x314) [0xb7e77d04]
/usr/lib/libruby-1.9.1.so.1.9(+0x14dfb7) [0xb7e77fb7]
/usr/lib/libruby-1.9.1.so.1.9(+0x145889) [0xb7e6f889]
/usr/lib/libruby-1.9.1.so.1.9(+0x14baee) [0xb7e75aee]
/usr/lib/libruby-1.9.1.so.1.9(rb_vm_invoke_proc+0x314) [0xb7e77d04]
/usr/lib/libruby-1.9.1.so.1.9(+0x57b23) [0xb7d81b23]
/usr/lib/libruby-1.9.1.so.1.9(+0x13fd28) [0xb7e69d28]
/usr/lib/libruby-1.9.1.so.1.9(+0x14e249) [0xb7e78249]
/usr/lib/libruby-1.9.1.so.1.9(+0x145889) [0xb7e6f889]
/usr/lib/libruby-1.9.1.so.1.9(+0x14baee) [0xb7e75aee]
/usr/lib/libruby-1.9.1.so.1.9(rb_vm_invoke_proc+0x314) [0xb7e77d04]
/usr/lib/libruby-1.9.1.so.1.9(+0x14dfb7) [0xb7e77fb7]
/usr/lib/libruby-1.9.1.so.1.9(+0x145889) [0xb7e6f889]
/usr/lib/libruby-1.9.1.so.1.9(+0x14baee) [0xb7e75aee]
/usr/lib/libruby-1.9.1.so.1.9(rb_vm_invoke_proc+0x314) [0xb7e77d04]
/usr/lib/libruby-1.9.1.so.1.9(+0x57b23) [0xb7d81b23]
/usr/lib/libruby-1.9.1.so.1.9(+0x13fd28) [0xb7e69d28]
/usr/lib/libruby-1.9.1.so.1.9(+0x14e249) [0xb7e78249]
/usr/lib/libruby-1.9.1.so.1.9(+0x145889) [0xb7e6f889]
/usr/lib/libruby-1.9.1.so.1.9(+0x14baee) [0xb7e75aee]
/usr/lib/libruby-1.9.1.so.1.9(+0x15113f) [0xb7e7b13f]
/usr/lib/libruby-1.9.1.so.1.9(rb_catch_obj+0xc7) [0xb7e698a7]
/usr/lib/libruby-1.9.1.so.1.9(+0x141356) [0xb7e6b356]
/usr/lib/libruby-1.9.1.so.1.9(+0x13fd28) [0xb7e69d28]
/usr/lib/libruby-1.9.1.so.1.9(+0x14e249) [0xb7e78249]
/usr/lib/libruby-1.9.1.so.1.9(+0x145889) [0xb7e6f889]
/usr/lib/libruby-1.9.1.so.1.9(+0x14baee) [0xb7e75aee]
/usr/lib/libruby-1.9.1.so.1.9(+0x14e8a2) [0xb7e788a2]
/usr/lib/libruby-1.9.1.so.1.9(+0x14316f) [0xb7e6d16f]
/usr/lib/libruby-1.9.1.so.1.9(+0x14e0e6) [0xb7e780e6]
/usr/lib/libruby-1.9.1.so.1.9(+0x145889) [0xb7e6f889]
/usr/lib/libruby-1.9.1.so.1.9(+0x14baee) [0xb7e75aee]
/usr/lib/libruby-1.9.1.so.1.9(rb_yield+0x22f) [0xb7e7b77f]
/usr/lib/libruby-1.9.1.so.1.9(rb_ary_each+0x52) [0xb7d4d542]
/usr/lib/libruby-1.9.1.so.1.9(+0x13fd0d) [0xb7e69d0d]
/usr/lib/libruby-1.9.1.so.1.9(+0x14e249) [0xb7e78249]
/usr/lib/libruby-1.9.1.so.1.9(+0x145889) [0xb7e6f889]
/usr/lib/libruby-1.9.1.so.1.9(+0x14baee) [0xb7e75aee]
/usr/lib/libruby-1.9.1.so.1.9(rb_yield+0x22f) [0xb7e7b77f]
/usr/lib/libruby-1.9.1.so.1.9(rb_protect+0x140) [0xb7d7c170]
/usr/lib/libruby-1.9.1.so.1.9(+0xbcc6f) [0xb7de6c6f]
/usr/lib/libruby-1.9.1.so.1.9(+0x13fd0d) [0xb7e69d0d]
/usr/lib/libruby-1.9.1.so.1.9(+0x14e249) [0xb7e78249]
/usr/lib/libruby-1.9.1.so.1.9(+0x145889) [0xb7e6f889]
/usr/lib/libruby-1.9.1.so.1.9(+0x14baee) [0xb7e75aee]
/usr/lib/libruby-1.9.1.so.1.9(rb_yield+0x22f) [0xb7e7b77f]
/usr/lib/libruby-1.9.1.so.1.9(+0xc1ac9) [0xb7debac9]
/usr/lib/libruby-1.9.1.so.1.9(+0x13fd0d) [0xb7e69d0d]
/usr/lib/libruby-1.9.1.so.1.9(+0x14e249) [0xb7e78249]
/usr/lib/libruby-1.9.1.so.1.9(+0x145889) [0xb7e6f889]
/usr/lib/libruby-1.9.1.so.1.9(+0x14baee) [0xb7e75aee]
/usr/lib/libruby-1.9.1.so.1.9(rb_iseq_eval+0x158) [0xb7e75f48]
/usr/lib/libruby-1.9.1.so.1.9(+0x549dd) [0xb7d7e9dd]
/usr/lib/libruby-1.9.1.so.1.9(+0x54b46) [0xb7d7eb46]
/usr/lib/libruby-1.9.1.so.1.9(+0x13fd28) [0xb7e69d28]
/usr/lib/libruby-1.9.1.so.1.9(+0x14e249) [0xb7e78249]
/usr/lib/libruby-1.9.1.so.1.9(+0x145889) [0xb7e6f889]
/usr/lib/libruby-1.9.1.so.1.9(+0x14baee) [0xb7e75aee]
/usr/lib/libruby-1.9.1.so.1.9(rb_iseq_eval_main+0xab) [0xb7e75dcb]
/usr/lib/libruby-1.9.1.so.1.9(+0x52d1a) [0xb7d7cd1a]
/usr/lib/libruby-1.9.1.so.1.9(ruby_exec_node+0x25) [0xb7d7cd55]
/usr/lib/libruby-1.9.1.so.1.9(ruby_run_node+0x35) [0xb7d7e415]
unicorn worker[3] -c /data/prod/linuxfr/production/current/config/unicorn.rb -D(main+0x68) [0x80487a8]
/lib/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xb7b7bc76]
unicorn worker[3] -c /data/prod/linuxfr/production/current/config/unicorn.rb -D() [0x80486a1]

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

I've tried to dig in with gdb:

#0  0x008be35b in printlinkyref (f=0xbfcc957c, tag=0x8c31a0, 
    link=0x9a0aed9 "http://weboob.org/AuM)", size=21) at generate.c:495
#1  0x008bec02 in linkyformat (f=0xbfcc957c, text=..., image=0, ref=0xbfcc9464)
    at generate.c:542
#2  0x008bf2f0 in linkylinky (image=, f=0xbfcc957c)
    at generate.c:611
#3  0x008bd85d in text (f=) at generate.c:1131
#4  0x008be240 in ___mkd_reparse (
    bfr=0x96e9690 "Backend : [AuM](http://weboob.org/AuM) ##", size=39, 
    flags=0, f=0xbfcc95fc) at generate.c:199
#5  0x008b9cfe in Csreparse (iot=0xbfcc9694, 
    buf=0x96e9690 "Backend : [AuM](http://weboob.org/AuM) ##", size=39, 
    flags=0) at Csio.c:57
#6  0x008ba1ee in mkd_toc (p=0x973aa68, doc=0xbfcc96ec) at toc.c:55
#7  0x008bacc7 in rb_rdiscount_toc_content (argc=0, argv=0xb74e8154, 
    self=162103120) at rdiscount.c:60
#8  0x0034c208 in call_cfunc (func=0x8bac00 , 
    recv=0, len=-1, argc=0, argv=0xb74e8154) at vm_insnhelper.c:315
#9  0x0035cc0e in vm_call_cfunc (th=, cfp=0xb7567c14, 
    num=0, blockptr=0x0, flag=0, id=24720, me=0x9aa90a0, recv=162103120)
    at vm_insnhelper.c:402
#10 vm_call_method (th=, cfp=0xb7567c14, num=0, 
    blockptr=0x0, flag=0, id=24720, me=0x9aa90a0, recv=162103120)

but my understanding of how discount works is too limited to find out out how to fix this bug. My guess is something should initialize the callback function for URL but does not.

JS friendly header IDs

With TOC generation enabled, the spaces in headers are turned into + and used as header IDs. These IDs are then used in the TOC anchors. This works with HTML anchors but causes issues is the ID is to be used as a JQuery selector.

Also it would be great to limit the depth that the TOC generator goes into: i.e. Only down to H1s.

Missing xml.c file

xml.c file is missing from ext folder. Extension does not compile without it.

Ampersands in HTML tags are double-escaped

This one might be upstream, but it's a bit of a nasty, given that most embed codes for widgets escape ampersands.

Normal behaviour is to escape ampersands in text:

>> RDiscount.new('element attr="value & etc"').to_html
=> "<p>element attr=\"value &amp; etc\"</p>\n"

But (correctly), escaped ampersands are not escaped again in text:

>> RDiscount.new('element attr="value &amp; etc"').to_html
=> "<p>element attr=\"value &amp; etc\"</p>\n"

But (incorrectly?), escaped ampersands are escaped again in HTML tags:

>> RDiscount.new('<element attr="value &amp; etc">').to_html
=> "<p><element attr=\"value &amp;amp; etc\"></p>\n"

(Since this issue is "Parsed with GitHub Flavoured Markdown", I have no idea whether it's going to look right, but hopefully you get the gist^H^H^H^Hdrift...)

Downgrade headers

How could I implement, that depending on the surrounding html context, headings of markdown text get downgraded?

So that this:

some header


<%= raw(markdown("#some md h1#", :start_with=>:h2) %>

would render

some header


some md h1#

Option to add rel="nofollow" to links

Hi,

Adding rel="nofollow" to links in user-generated content is a common way to discourage SEO spam, though I haven't found a way to do this automatically in RDiscount. Is there an option to turn this on?

Thanks

Encoding issues with 1.9.2 on Solaris

Hi,
I'm having some encoding problems with RDiscount 1.6.8. I'm not convinced that they're RDiscount's fault, but I'm not quite sure how to narrow it down any further.

Some strings in our database are producing invalid encodings when passed through RDiscount. Certain character sets seem to cause trouble - for example, the tamil character ழ - U+0BB4.

  s = "\u0BB4\n"
  '\x%X\x%X\x%X' % s.each_byte.to_a #=> "\xE0\xAE\xB4"

  RDiscount.new(s).to_html #=> "<p>\xE0\xAE</p>\n"
  RDiscount.new(s).to_html.valid_encoding? # => false

So in the original string, that codepoint is represented with the bytes 0xE0,0xAE,0xB4, but after rdiscounting we end up with just 0xE0,0xAE.

This is on a Solaris box running ruby 1.9.2p180. An OS X box running the same ruby & rdiscount version works fine. What else can I look at to pinpoint the problem some more?

Just smartypants?

Is there a way so that rdiscount will ONLY do curly quotes and such without everything else?

If I'm pulling a title or something from a database it might have quotes and such, but I certainly don't want it wrapped in

title

\n.

Double Space for Line Break Breaks SmartyPants

When a line that ends in a double space (to force a line break) also ends in a closing quotation mark, SmartyPants isn't converting the quotation mark like it should be.

> RDiscount.new(%("one" \ntwo), :smart).to_html
=> "<p>&ldquo;one&quot;<br/>\ntwo</p>\n"

Without the trailing double space it works fine, of course.

> RDiscount.new(%("one"\ntwo), :smart).to_html
=> "<p>&ldquo;one&rdquo;\ntwo</p>\n"

rdiscount is broken in os x snow leopard

After installing via gems: gem install rdiscount
Invoking: rdiscount
Will yield:

ruby/18/gems/rdiscount-1.3.5/lib/rdiscount.bundle: dlopen(/.gem/ruby/18/gems/rdiscount-1.3.5/lib/rdiscount.bundle, 9): no suitable image found. Did find: (LoadError) /.gem/ruby/18/gems/rdiscount-1.3.5/lib/rdiscount.bundle: mach-o, but wrong architecture - /.gem/ruby/18/gems/rdiscount-1.3.5/lib/rdiscount.bundle from /opt/ruby18/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require'
from /.gem/ruby/18/gems/rdiscount-1.3.5/lib/rdiscount.rb:72
from /opt/ruby18/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /opt/ruby18/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require'
from /.gem/ruby/18/gems/rdiscount-1.3.5/bin/rdiscount:4
from /.gem/ruby/18/bin/rdiscount:19:in load' from /.gem/ruby/18/bin/rdiscount:19

ree-2011.02 segfaults with rake -T

steps to reproduce
rvm install ree-1.8.7-2011.02
rvm use ree-1.8.7-2011.02
git clone git://github.com/newrelic/newrelic_api.git
bundle
rake -T

result:

/Users/jade/.rvm/gems/ree-1.8.7-2011.02/gems/rdiscount-1.6.5/lib/rdiscount.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.7.0], MBARI 0x6770, Ruby Enterprise Edition 2011.02

Abort trap

The same steps in ree-1.8.7-2010.02 work fine.

`:generate_toc` yields invalid (X)HTML with some characters in headings

's in headings are not removed from the ID attributes when using :generate_toc, thereby invalidating the (X)HTML. There could be other characters that have this unfortunate effect. I could say, I haven't perused the code. I don't even know if this is a discount issue or an rdiscount issue, sorry.

Feature request: targets for links

I'd love to see the ability to use a target value in a link, something along these lines:

[Link text here](http://theurl.com "Title" "_target")

or

[id]: http://theurl.com "Title" "_target"

I ask because while I've written helpers to process my code and add a target based on a wierd addition to the standard syntax, it is a slow operation and is relatively unclean code-wise.

Thanks!

HTML5 elements

Hi,

I saw that you've pulled in a patch from rcrowley (a603534), and begun the support for HTML5 elements. It's not used in the final code though, and I wonder why? Or rather, how can I enable it?

.glenn

Generating <code> tag.

hi,

thanks for the awesome tool, i really like it. however there is a problem that i have encountered, maybe i'm doing something wrong. According to the markdown docs, markdown should generate code tag for 4 spaces and 1 tabs. However with rdiscount, i have to make it at least 6 spaces. after that it uses the < code> tag.

Anchors for headings

Sometime we need to link the particular topics of the page. If title h[1-6] tags have these id attributes, we can link that via the url with #id.

Unfortunately RDiscount seems not able to generate id attributes for headings (though it can generate table of contents through an extension). We maybe able to instead use Pandoc which is a richer tool for Markdown than RDiscount, but I am not sure about it.

Nested ordered lists don't nest properly

When I type an ordered list like this:

1.  blah
  1.  blah

It should result in html that looks like:

<ol>
<li>blah
<ol><li>blah</li></ol></li>
</ol>

But instead I'm getting:

<ol>
<li>blah</li>
<li>blah</li>
</ol>

Am I doing something wrong?

Bad interaction between table columns and code highlighting

The backtick code highlighting is interacting badly with table column separators when the backtick-enclosed code string happens to contain a pipe (|) character.

For example, the following Markdown table is rendered incorrectly (unreadably):

Ruby PHP
`a

Automatic links for git protocol

This Markdown text:

<git://github.com/rtomayko/rdiscount.git>

should convert to:

<a href="git://github.com/rtomayko/rdiscount.git">git://github.com/rtomayko/rdiscount.git</a>

It is instead converted to:

&lt;git://github.com/rtomayko/rdiscount.git>

John Grubber's Markdown Syntax document is not completely precise about this, but it does say that automatic links work on URL and email addresses.

And as the arbitrary protocol specification is part of a URL, it should work for git:// and (ideally) any other protocol out there.

UTF-8 characters aren’t properly encoded in URLs

RDiscount.new('[Test](http://example.com/ß)').to_html

erroneously gives

<p><a href=\"http://example.com/\xC3%9F\">Test</a></p>\n

instead of

<p><a href=\"http://example.com/%C3%9F\">Test</a></p>\n

This may be related to #46 but I’m not sure.

Emphasis should have a whitespace before to render

This is probably a twist in the markdown language but I think it's important:

If someone types this_cool_method() then the word "cool" will be emphasized which is not the expected output the author wanted. In order to emphasize words, at least a whitespace should be in front of the word so that:

Ruby has this_cool_method() => Ruby has this_cool_method()

UTF-8 characters break in Ruby 1.9

I'm building a Rails app using Ruby 1.9.1, and using RDiscount to manage a lot of my output. Everything's fast and beautiful, except for an exception that occurs when user-submitted data contains Unicode characters:

Encoding::CompatibilityError: incompatible character encodings: UTF-8 and ASCII-8BIT

FWIW, the specific example that broke it was a string containing the word Yogācāra (a form of Buddhism). It took a while to eliminate other factors and trace this error back to RDiscount. It seems that even if input goes in as UTF-8, the output comes out as ASCII with \x escapes.

I was able to resolve the issue in my application by forcing the encoding in my formatting helper:

# Renders the string passed as Markdown text, with proper UTF-8 management
def markdown(val)
  RDiscount.new(val, :smart).to_html.force_encoding('UTF-8')
end

So it's not a showstopper. But as more people make the slow migration to Ruby 1.9, this may begin to become a higher-visibility issue. Thanks for your time.

Pass rdiscount a safe_buffer, get back an unsafe_buffer?

Using rdiscount 1.6.8

ruby-1.8.7-p334 :001 > original_string = "abc"
=> "abc"
ruby-1.8.7-p334 :002 > original_string.html_safe?
=> false
ruby-1.8.7-p334 :003 > safe_string = original_string.html_safe
=> "abc"
ruby-1.8.7-p334 :004 > safe_string.html_safe?
=> true
ruby-1.8.7-p334 :005 > rdiscount_string = RDiscount.new(safe_string).to_html
=> "

abc

\n"
ruby-1.8.7-p334 :006 > rdiscount_string.html_safe?
=> false
ruby-1.8.7-p334 :007 >

I'll clone and do a fix (I think) when I get a few minutes.

-Kelly

Reference links without subsequent bracketed reference do not work

While the Markdown specs say we should write reference links followed by empty brackets if the reference word is the same as the linked word, like

Google is a search engine

Gruberg writes them without the empty brackets, just like:

Yahoo is another search engine

Like in this article (seach for [previously]).

His Markdown Dingus and other markdown parsers such as WMD-Editor do behave this way.

Note: this issue was first posted to http://github.com/toland/qlmarkdown/issues/#issue/2 and then to http://support.github.com/discussions/gist/63-bugs-in-markdown-rendering, but both bugs seem to come from rdiscount.

no such file to load -- rdiscount.so (on OSX)

I vendorized the rdiscount gem in my Rails project, and when I started up the server I got:

no such file to load -- rdiscount.so
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
/Users/elliot/Sites/localhost/htdocs/proj/nonwork/rails_apps/test/vendor/gems/rtomayko-rdiscount-1.3.4/lib/rdiscount.rb:72

I noticed that rdiscount.rb has require 'rdiscount.so' at the end. But OSX generates .bundle files, not .so files. I changed this to just require 'rdiscount' and it seemed to work.

use discount library's defaults flags

I think that RDiscount should use the Discount library's default set of flags, unless the user specifies otherwise.

For instance, the Discount library enables SmartyPants processing by default, whereas RDiscount disables it by default. This mismatch (inversion, really) caused me great frustration as my triple dashes were not being converted into mdash in RDiscount.

Keep RDiscount simple by reflecting the underlying library's defaults please! 👮

Thanks for your consideration.

Non-newlines preceding pre tags break the pre formatting

The two following invocations should result in identical pre tags.

>> RDiscount.new("<pre>\nthis is `a\\_test` and this\\_too\n</pre>").to_html
=> "<pre>\nthis is `a\\_test` and this\\_too\n</pre>\n\n"
>> RDiscount.new("lol<pre>\nthis is `a\\_test` and this\\_too\n</pre>").to_html
=> "<p>lol<pre>\nthis is <code>a\\_test</code> and this_too\n</pre></p>\n"

:filter_html sanitizes new lines

When :filter_html is enabled, the following code (two spaces at the end of the first line):

Lorem,  
ipsum

is converted to:

<p>Lorem&lt;br/>
ipsum</p>

instead of:

<p>Lorem<br/>
ipsum</p>

With :filter_html turned off, everything works fine.

support definition lists?

Discount supports definitions lists, with the following syntax:

=test=
    definition here

It appears that defining DL_TAG_EXTENSION in ext/config.h would enable it.
Is there a particular reason that it is not enabled now? (eg. Some breakage or other issue?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.