Quote:
Originally Posted by DiapDealer
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.