Closed GoogleCodeExporter closed 9 years ago
Forgot to add a description of the smarty-pants extra in the docs at the top of
the file.
Original comment by nikhil.chelliah
on 21 Jun 2010 at 12:42
Attachments:
Nikhil,
Just a note that I've been looking at your patch and I'll definitely be
accepting it. Great stuff. I'd had it on my wish list to have Smarty Pants
support. It might take me a day or two to get the patch in tho.
Original comment by tre...@gmail.com
on 21 Jun 2010 at 6:18
First part added in r256.
Original comment by tre...@gmail.com
on 21 Jun 2010 at 5:54
Finished in r257. Thanks a lot Nikhil!
This will be in a (coming) 1.0.1.18 release.
Original comment by tre...@gmail.com
on 21 Jun 2010 at 6:09
No problem, and thanks for including the patch.
I've made some changes on top of r257 to let SmartyPants detect the
contractions: 'tis 'twas 'twer 'oer 'neath 'o 'n 'round 'bout 'twixt 'nuff
'fraid 'sup
It's true that people might type 'round, 'bout, etc. with ' supposed to be an
opening scare quote, but that's probably pretty rare.
There are others, such as words without their initial h (as in the Cockney
accent), but those are extremely archaic and too numerous to keep track of.
Original comment by nikhil.chelliah
on 22 Jun 2010 at 8:11
Attachments:
Here's a better patch - this one will also convert the apostrophe in '65, '09,
etc.
Hopefully that's the last patch for a while.
Original comment by nikhil.chelliah
on 22 Jun 2010 at 9:45
Attachments:
re-opening this bug so Nikhil's additions don't get lost.
Original comment by tre...@gmail.com
on 22 Jun 2010 at 10:19
Couple more changes - ellipses can now have a space on either side, and only
numeric entities are used instead of named ones (e.g. ‘ instead of ‘)
because the latter isn't really supported in XML/XHTML.
Again, the patches include all my changes since r257.
Original comment by nikhil.chelliah
on 1 Jul 2010 at 11:52
Attachments:
I've applied your latest patches (with only minor changes, see below) in r259.
Thanks!
Minor changes:
- Dropped "oer" from `_contractions`. The contraction is "o'er" is it not?
Hence it isn't one of the leading-quote-contractions.
- Added a couple `if "'" in text` guards. Similar guards have proved useful for
performance in other areas. Though really whether this helps or hinders depends
on the data set.
Original comment by tre...@gmail.com
on 17 Jul 2010 at 7:00
Sounds good. I'm not exactly sure why I thought o'er had a leading apostrophe,
but thanks for catching it.
Original comment by nikhil.chelliah
on 20 Jul 2010 at 4:00
Original issue reported on code.google.com by
nikhil.chelliah
on 19 Jun 2010 at 2:43Attachments: