handle underline text
PR: 203109
This commit is contained in:
parent
3694a4dad2
commit
88b14f06a6
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=50834
1 changed files with 7 additions and 18 deletions
|
|
@ -1644,25 +1644,14 @@ sub encode_data {
|
||||||
s/\</\<\;/g;
|
s/\</\<\;/g;
|
||||||
s/\>/\>\;/g;
|
s/\>/\>\;/g;
|
||||||
|
|
||||||
s,((_\010[^_])+),($str = $1) =~ s/.\010//g; "<i>$str</i>";,ge;
|
# underline: _^H.^H(.)
|
||||||
s,((.\010.)+),($str = $1) =~ s/.\010//g; "<b>$str</b>";,ge;
|
s,((_\010[^_]\010.)+),($str = $1) =~ s/_\010..//g; "<I>$str</I>";,ge;
|
||||||
|
|
||||||
#s,((_\010.)+),($str = $1) =~ s/.\010//g; "<i>$str</i>";,ge;
|
# italic: _^H(.)
|
||||||
#s,(.\010)+,$1,g;
|
s,((_\010[^_])+),($str = $1) =~ s/.\010//g; "<i>$str</i>";,ge;
|
||||||
#if (!s,((.\010.)+\s+(.\010.)+),($str = $1) =~ s/.\010//g; "<b>$str</b>";,ge) {
|
|
||||||
# s,(([^_]\010.)+),($str = $1) =~ s/[^_]\010//g; "<b>$str</b>";,ge;
|
# bold: .^H(.)
|
||||||
# s,(([_]\010.)+),($str = $1) =~ s/[_]\010//g; "<i>$str</i>";,ge;
|
s,(([^_]\010.)+),($str = $1) =~ s/.\010//g; "<b>$str</b>";,ge;
|
||||||
#}
|
|
||||||
# Escape binary data except for ^H which we process below
|
|
||||||
# \375 gets turned into the & for the entity reference
|
|
||||||
#s/([^\010\012\015\032-\176])/sprintf('\375#%03d;',ord($1))/eg;
|
|
||||||
# Process ^H sequences, we use \376 and \377 (already escaped
|
|
||||||
# above) to stand in for < and > until those characters can
|
|
||||||
# be properly escaped below.
|
|
||||||
#s,\376[IB]\377_\376/[IB]\377,,g;
|
|
||||||
#s/.[\b]//g; # just do an erase for anything else
|
|
||||||
# Now convert our magic chars into our tag markers
|
|
||||||
#s/\375/\&/g; s/\376/</g; s/\377/>/g;
|
|
||||||
|
|
||||||
# cleanup all the rest
|
# cleanup all the rest
|
||||||
s,.\010,,g;
|
s,.\010,,g;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue