From owner-svn-doc-head@freebsd.org Thu Sep 14 11:38:15 2017 Return-Path: Delivered-To: svn-doc-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5D9BE119E1; Thu, 14 Sep 2017 11:38:15 +0000 (UTC) (envelope-from wosch@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84CDE70846; Thu, 14 Sep 2017 11:38:15 +0000 (UTC) (envelope-from wosch@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8EBcEEM076597; Thu, 14 Sep 2017 11:38:14 GMT (envelope-from wosch@FreeBSD.org) Received: (from wosch@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8EBcE0f076596; Thu, 14 Sep 2017 11:38:14 GMT (envelope-from wosch@FreeBSD.org) Message-Id: <201709141138.v8EBcE0f076596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wosch set sender to wosch@FreeBSD.org using -f From: Wolfram Schneider Date: Thu, 14 Sep 2017 11:38:14 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r50834 - head/en_US.ISO8859-1/htdocs/cgi X-SVN-Group: doc-head X-SVN-Commit-Author: wosch X-SVN-Commit-Paths: head/en_US.ISO8859-1/htdocs/cgi X-SVN-Commit-Revision: 50834 X-SVN-Commit-Repository: doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Sep 2017 11:38:15 -0000 Author: wosch Date: Thu Sep 14 11:38:14 2017 New Revision: 50834 URL: https://svnweb.freebsd.org/changeset/doc/50834 Log: handle underline text PR: 203109 Modified: head/en_US.ISO8859-1/htdocs/cgi/man.cgi Modified: head/en_US.ISO8859-1/htdocs/cgi/man.cgi ============================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/man.cgi Wed Sep 13 21:51:31 2017 (r50833) +++ head/en_US.ISO8859-1/htdocs/cgi/man.cgi Thu Sep 14 11:38:14 2017 (r50834) @@ -1644,25 +1644,14 @@ sub encode_data { s/\/\>\;/g; + # underline: _^H.^H(.) + s,((_\010[^_]\010.)+),($str = $1) =~ s/_\010..//g; "$str";,ge; + + # italic: _^H(.) s,((_\010[^_])+),($str = $1) =~ s/.\010//g; "$str";,ge; - s,((.\010.)+),($str = $1) =~ s/.\010//g; "$str";,ge; - #s,((_\010.)+),($str = $1) =~ s/.\010//g; "$str";,ge; - #s,(.\010)+,$1,g; - #if (!s,((.\010.)+\s+(.\010.)+),($str = $1) =~ s/.\010//g; "$str";,ge) { - # s,(([^_]\010.)+),($str = $1) =~ s/[^_]\010//g; "$str";,ge; - # s,(([_]\010.)+),($str = $1) =~ s/[_]\010//g; "$str";,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; + # bold: .^H(.) + s,(([^_]\010.)+),($str = $1) =~ s/.\010//g; "$str";,ge; # cleanup all the rest s,.\010,,g;