- if( $modified =~ s{ ([[:space:]]) \& ([[:space:]]) }{$1\&ersand;$2}xg ) { $replacements = 1; }
- if( $modified =~ s{ [[:space:]]+ - [[:space:]]+ }{\&emdash;}xg ) { $replacements = 1; }
- if( $modified =~ s{ (?<!\!) ([[:space:]])* -- ([[:space:]])* (?!>) }{$1\&emdash;$2}xg ) { $replacements = 1; }
- if( $modified =~ s{ [[:space:]]* \227 [[:space:]]* }{\&emdash;}xg ) { $replacements = 1; }
- if( $modified =~ s{ ([[:digit:]]) - ([[:digit:]]) }{$1\&endash;$2}xg ) { $replacements = 1; }
- if( $modified =~ s{ [[:space:]]* \227 [[:space:]]* }{\&endash;}xg ) { $replacements = 1; }
- if( $modified =~ s{ > [[:space:]]* \. [[:space:]]* \. ([[:space:]]* \.)? }{>\&lellips;}xg ) { $replacements = 1; }
- if( $modified =~ s{ [[:space:]]* \. [[:space:]]* \. ([[:space:]]* \.)? }{\&ellips;}xg ) { $replacements = 1; }
- if( $modified =~ s{ (</?quote>) \1 }{\&thinspace;}xg ) { $replacements = 1; }
- if( $modified =~ s{ <quote> \' }{<quote>\&thinspace;\'}xg ) { $replacements = 1; }
- if( $modified =~ s{ \' </quote> }{\'\&thinspace;</quote>}xg ) { $replacements = 1; }
- if( $modified =~ s{ __+ }{\&blankline;}xg ) { $replacements = 1; }
- if( $modified =~ s{\%}{\&percent;}xg ) { $replacements = 1; }
+ if( $modified =~ s{ ([[:space:]]) \& ([[:space:]]) }{$1<ch.ampersand/>$2}xg ) { $replacements = 1; }
+ if( $modified =~ s{ [[:space:]]+ - [[:space:]]+ }{<ch.emdash/>}xg ) { $replacements = 1; }
+ if( $modified =~ s{ (?<!\!) ([[:space:]])* -- ([[:space:]])* (?!>) }{$1<ch.emdash/>$2}xg ) { $replacements = 1; }
+ if( $modified =~ s{ [[:space:]]* \227 [[:space:]]* }{<ch.emdash/>}xg ) { $replacements = 1; }
+ if( $modified =~ s{ ([[:digit:]]) - ([[:digit:]]) }{$1<ch.endash/>$2}xg ) { $replacements = 1; }
+ if( $modified =~ s{ [[:space:]]* \227 [[:space:]]* }{<ch.endash/>}xg ) { $replacements = 1; }
+ if( $modified =~ s{ > [[:space:]]* \. [[:space:]]* \. ([[:space:]]* \.)? }{><ch.lellips/>}xg ) { $replacements = 1; }
+ if( $modified =~ s{ [[:space:]]* \. [[:space:]]* \. ([[:space:]]* \.)? }{<ch.ellips/>}xg ) { $replacements = 1; }
+ if( $modified =~ s{ (</?quote>) \1 }{<ch.thinspace/>}xg ) { $replacements = 1; }
+ if( $modified =~ s{ <quote> \' }{<quote><ch.thinspace/><ch.apos/>}xg ) { $replacements = 1; }
+ if( $modified =~ s{ \' </quote> }{<ch.apos/><ch.thinspace/></quote>}xg ) { $replacements = 1; }
+ if( $modified =~ s{ __+ }{<ch.blankline/>}xg ) { $replacements = 1; }
+ if( $modified =~ s{\%}{<ch.percent/>}xg ) { $replacements = 1; }