View Single Post
Old 09-07-2023, 10:50 AM   #9
nabsltd
Fanatic
nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.
 
Posts: 528
Karma: 9529956
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe, Kindle 4 Touch
Quote:
Originally Posted by DiapDealer View Post
Regex ain't magic.
An iterative application of a regex search and replace could pull all punctuation outside of a certain tag, but not like his example, since there are commas both inside and outside of the tag in the end result.

That said, tags tend to have semantic value, so any fully automated system will definitely get it wrong at times. <em></em> used like quotes around a thought should follow the same rules as quotation marks, so punctuation goes inside. Emphasizing just a word or phrase shouldn't have the tags include starting and ending punctuation.

Getting these right is by far the most time-consuming part of my fix of CSS from commercial eBooks.
nabsltd is offline   Reply With Quote