I''m curious to know if there is a way to have RedCloth apply only the quotation-mark transformation: basically, I want my quotation marks to be curly, but I do not want bolding, subscript, italics, etc. Is this possible with RedCloth? (Or with any plugin, for that matter? Or with Regex?) Thanks for any tips or advice you might have! Brian Christian -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/redcloth-upwards/attachments/20130502/281fec6d/attachment.html>
Look for "smartypants ruby" Here''s one library: https://github.com/jmcnevin/rubypants On Thursday, May 2, 2013, Brian Christian wrote:> I''m curious to know if there is a way to have RedCloth apply only the > quotation-mark transformation: basically, I want my quotation marks to be > curly, but I do not want bolding, subscript, italics, etc. Is this possible > with RedCloth? (Or with any plugin, for that matter? Or with Regex?) > > Thanks for any tips or advice you might have! > > Brian Christian >-- // Magnus Holm -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/redcloth-upwards/attachments/20130502/ad9c1b84/attachment.html>
If your site setup is UTF-8 throughout, you can use and store curly quotes without any HTML encoding, if that helps - DaveE> I''m curious to know if there is a way to have RedCloth apply only > the quotation-mark transformation: basically, I want my quotation > marks to be curly, but I do not want bolding, subscript, italics, > etc. Is this possible with RedCloth? (Or with any plugin, for that > matter? Or with Regex?) > > Thanks for any tips or advice you might have! > > Brian Christian > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards
DaveE, That''s a reasonable approach, but I don''t want to force users to have to remember curly quotes when creating content. I''d rather do it at the moment of display. Magnus, RubyPants is a great solution, but I can''t help noticing that RedCloth is much smarter than RubyPants about sentences like ''Tis true that I met him in ''04. RedCloth correctly makes both single quotes into close-quotes, whereas RubyPants incorrectly makes both of them into open-quotes. So I guess I''m still looking for a way to either use just the quotes functionality of RedCloth (i.e., not parsing asterisks or underscores, etc.), or a way to tweak RubyPants (or an alternative) to bring it up to RedCloth''s level of correctness for parsing quotes. Any thoughts?> ------------------------------ > > Message: 5 > Date: Thu, 2 May 2013 08:34:56 -0700 > From: Brian Christian <brchristian at gmail.com> > To: redcloth-upwards at rubyforge.org > Subject: Just Typographer''s Quotes? > Message-ID: > <CAKQUbsF0_5ATzCUnvScJxAQ9sf> GcCGWF2p3MND2X+eVmoehQw at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > I''m curious to know if there is a way to have RedCloth apply only the > quotation-mark transformation: basically, I want my quotation marks to be > curly, but I do not want bolding, subscript, italics, etc. Is this possible > with RedCloth? (Or with any plugin, for that matter? Or with Regex?) > > Thanks for any tips or advice you might have! > > Brian Christian > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://rubyforge.org/pipermail/redcloth-upwards/attachments/20130502/281fec6d/attachment-0001.html > > > > ------------------------------ > > Message: 6 > Date: Thu, 2 May 2013 18:08:45 +0200 > From: Magnus Holm <judofyr at gmail.com> > To: "redcloth-upwards at rubyforge.org" <redcloth-upwards at rubyforge.org> > Subject: Re: Just Typographer''s Quotes? > Message-ID: > <CAJ367fdXD> D_+fdMnBPQtJTsvn2uut+kfJZvVbnb-1gVwoQ56Q at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Look for "smartypants ruby" > > Here''s one library: https://github.com/jmcnevin/rubypants > > On Thursday, May 2, 2013, Brian Christian wrote: > > > I''m curious to know if there is a way to have RedCloth apply only the > > quotation-mark transformation: basically, I want my quotation marks to be > > curly, but I do not want bolding, subscript, italics, etc. Is this > possible > > with RedCloth? (Or with any plugin, for that matter? Or with Regex?) > > > > Thanks for any tips or advice you might have! > > > > Brian Christian > > > > > -- > > // Magnus Holm > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://rubyforge.org/pipermail/redcloth-upwards/attachments/20130502/ad9c1b84/attachment-0001.html > > > > ------------------------------ > > Message: 7 > Date: Thu, 2 May 2013 17:20:03 +0100 > From: Dave Everitt <deveritt at innotts.co.uk> > To: redcloth-upwards at rubyforge.org > Subject: Re: Just Typographer''s Quotes? > Message-ID: <29135296-3EF0-4FB9-A5AF-159B28CB4ECC at innotts.co.uk> > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes > > If your site setup is UTF-8 throughout, you can use and store curly > quotes without any HTML encoding, if that helps - DaveE > > > I''m curious to know if there is a way to have RedCloth apply only > > the quotation-mark transformation: basically, I want my quotation > > marks to be curly, but I do not want bolding, subscript, italics, > > etc. Is this possible with RedCloth? (Or with any plugin, for that > > matter? Or with Regex?) > > > > Thanks for any tips or advice you might have! > > > > Brian Christian > > _______________________________________________ > > Redcloth-upwards mailing list > > Redcloth-upwards at rubyforge.org > > http://rubyforge.org/mailman/listinfo/redcloth-upwards > > > > ------------------------------ > > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards > > End of Redcloth-upwards Digest, Vol 37, Issue 3 > *********************************************** >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/redcloth-upwards/attachments/20130502/2177901a/attachment.html>
Hi Brian - I use Kramdown (for its multimarkdown support) - it also converts single and double "inch" and ''foot'' marks into typographic quotes, but since the source material determines how the parser works through the text, I can''t say if the conversion is any more reliable than RubyPants, or any easier to extract the snippet that does the conversion - source: https://github.com/gettalong/kramdown - DaveE> DaveE, That''s a reasonable approach, but I don''t want to force users > to have to remember curly quotes when creating content. I''d rather > do it at the moment of display. > > Magnus, RubyPants is a great solution, but I can''t help noticing > that RedCloth is much smarter than RubyPants about sentences like > ''Tis true that I met him in ''04. RedCloth correctly makes both > single quotes into close-quotes, whereas RubyPants incorrectly makes > both of them into open-quotes. > > So I guess I''m still looking for a way to either use just the quotes > functionality of RedCloth (i.e., not parsing asterisks or > underscores, etc.), or a way to tweak RubyPants (or an alternative) > to bring it up to RedCloth''s level of correctness for parsing quotes. > > Any thoughts? > > > ------------------------------ > > Message: 5 > Date: Thu, 2 May 2013 08:34:56 -0700 > From: Brian Christian <brchristian at gmail.com> > To: redcloth-upwards at rubyforge.org > Subject: Just Typographer''s Quotes? > Message-ID: > <CAKQUbsF0_5ATzCUnvScJxAQ9sf=GcCGWF2p3MND2X+eVmoehQw at mail.gmail.com > > > Content-Type: text/plain; charset="iso-8859-1" > > I''m curious to know if there is a way to have RedCloth apply only the > quotation-mark transformation: basically, I want my quotation marks > to be > curly, but I do not want bolding, subscript, italics, etc. Is this > possible > with RedCloth? (Or with any plugin, for that matter? Or with Regex?) > > Thanks for any tips or advice you might have! > > Brian Christian > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: <http://rubyforge.org/pipermail/redcloth-upwards/attachments/20130502/281fec6d/attachment-0001.html > > > > ------------------------------ > > Message: 6 > Date: Thu, 2 May 2013 18:08:45 +0200 > From: Magnus Holm <judofyr at gmail.com> > To: "redcloth-upwards at rubyforge.org" <redcloth-upwards at rubyforge.org> > Subject: Re: Just Typographer''s Quotes? > Message-ID: > <CAJ367fdXD=D_+fdMnBPQtJTsvn2uut+kfJZvVbnb-1gVwoQ56Q at mail.gmail.com > > > Content-Type: text/plain; charset="utf-8" > > Look for "smartypants ruby" > > Here''s one library: https://github.com/jmcnevin/rubypants > > On Thursday, May 2, 2013, Brian Christian wrote: > > > I''m curious to know if there is a way to have RedCloth apply only > the > > quotation-mark transformation: basically, I want my quotation > marks to be > > curly, but I do not want bolding, subscript, italics, etc. Is this > possible > > with RedCloth? (Or with any plugin, for that matter? Or with Regex?) > > > > Thanks for any tips or advice you might have! > > > > Brian Christian > > > > > -- > > // Magnus Holm > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: <http://rubyforge.org/pipermail/redcloth-upwards/attachments/20130502/ad9c1b84/attachment-0001.html > > > > ------------------------------ > > Message: 7 > Date: Thu, 2 May 2013 17:20:03 +0100 > From: Dave Everitt <deveritt at innotts.co.uk> > To: redcloth-upwards at rubyforge.org > Subject: Re: Just Typographer''s Quotes? > Message-ID: <29135296-3EF0-4FB9-A5AF-159B28CB4ECC at innotts.co.uk> > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes > > If your site setup is UTF-8 throughout, you can use and store curly > quotes without any HTML encoding, if that helps - DaveE > > > I''m curious to know if there is a way to have RedCloth apply only > > the quotation-mark transformation: basically, I want my quotation > > marks to be curly, but I do not want bolding, subscript, italics, > > etc. Is this possible with RedCloth? (Or with any plugin, for that > > matter? Or with Regex?) > > > > Thanks for any tips or advice you might have! > > > > Brian Christian > > _______________________________________________ > > Redcloth-upwards mailing list > > Redcloth-upwards at rubyforge.org > > http://rubyforge.org/mailman/listinfo/redcloth-upwards > > > > ------------------------------ > > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards > > End of Redcloth-upwards Digest, Vol 37, Issue 3 > *********************************************** > > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/redcloth-upwards/attachments/20130503/95dd279d/attachment.html>