Deleted Added
sdiff udiff text old ( 167466 ) new ( 231990 )
full compact
1: # -*- perl -*-
2# $tcsh: tcsh.man2html,v 1.15 2011/02/05 16:15:56 christos Exp $
3
4# tcsh.man2html, Dave Schweisguth <dcs@proton.chem.yale.edu>
5#
6# Notes:
7#
8# Always puts all files in the directory tcsh.html, creating it if necessary.
9# tcsh.html/top.html is the entry point, and tcsh.html/index.html is a symlink
10# to tcsh.html/top.html so one needn't specify a file at all if working through

--- 673 unchanged lines hidden (view full) ---

684 } else {
685 push(@end, $#para); # End at the end
686 }
687
688 # Fontify each part
689
690 $bold = $italic = 0;
691 foreach $i (0 .. $#begin) {
692 $part = join('', @para[$begin[$i] .. $end[$i]]);
693 $part =~ s/^\.([BI])\s+(.*)$/\\f$1$2\\fR/gm; # .B, .I
694 @pieces = split(/(\\f[BIR])/m, $part);
695 $part = '';
696 foreach $j (@pieces) {
697 if ($j eq '\fB') {
698 if ($italic) {
699 $italic = 0;
700 $part .= '</I>';
701 }
702 unless ($bold) {

--- 16 unchanged lines hidden (view full) ---

719 } elsif ($italic) {
720 $italic = 0;
721 $part .= '</I>';
722 }
723 } else {
724 $part .= $j;
725 }
726 }
727
728 # Close bold/italic before break
729
730 if ($end[$i] == $#para || $para[$end[$i] + 1] =~ /^<BR>/) {
731 # Perl 5 lossage alert
732 if ($bold) {
733 $bold = 0;
734 $part =~ s/(\n)?$/<\/B>$1\n/;

--- 116 unchanged lines hidden ---