View Single Post
Old 08-04-2014, 08:14 PM   #15
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,572
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Definitely something up with that first example. I'll take a look. But as far as:
Quote:
Originally Posted by arspr
Why duplicated single apostrophes are not collapsed into double ones?
That's never been a feature of the SmartyPants smartening algorithm. Unless you're talking about back-ticks. If so, I'm afraid I've purposely left the smartening of back-ticks (double or single) out of this entirely. I never run into back-ticks and it just confuses the hell out of things, frankly.

Quote:
And now a suggestion:

'90s is a decade contraction and it needs a right curly quote.
'90 is a number in a dialogue', John said, 'so it needs a left curly one.'
That's why no automated smartening algorithm is going to be perfect.

Quote:
As coding an automate substitution rule for ' before numbers can be really hard, I propose asking the user each time an occurrence happens.
But then that's not "automated." I'm just not that interested in pausing the processing for user interaction. That's something that S&R (regex or otherwise) is perfectly capable of doing. Basically, this is just a wrapper around SmartyPants (just like calibre's smartening implementation) that allows a little more granular control of SmartyPants and extends it's capabilities with the apostrophe exception file. Others are more than welcome to use what I've started and make it sing and dance to their own tune.

Quote:
OTOH about the tag substitution feature:
It only works on the current file, not in all text files. Why?
Because you need to uncheck the box in the menu that limits it to the current file only.
Quote:
I also vote for adding more options in addition to em & strong. Could you leave it open so any tag could be written?
As I mentioned above, other tags can be added to the json settings file to allow you to change the "replacement" tags to almost anything you want. There's just no nice gui dialog to do it for you.

Last edited by DiapDealer; 08-04-2014 at 08:35 PM.
DiapDealer is online now