Tags:
archive_me1Add my vote for this tag create new tag
view all tags
I made a small enhacement: Spaces in "fixed font text" should be preserved, i.e. writing "three   spaces" should render as three   spaces.

Here is the implementation. In wiki.pm I added:

# =========================
sub fixedFontText
{
	 my( $theText ) = @_;
	 # preserve white space, so replace it by "  " patterns
	 $theText =~ s/\t/	/go;
	 $theText =~ s|((?:[\s]{2})+)([^\s])|'  ' x (length($1) / 2) . "$2"|eg;
	 return "$theText";
}

Then, in # Emphasizing of sub getRenderedVersion I changed the fixed font regex to:

# Emphasizing
  s/([\s])=([^\s].*?[^\s])=([\s\,\.\;\:\!\?])/$1 . fixedFontText($2) . $3/geo;

Commited to TWikiAlphaRelease, version 02 Dec 2000.

-- PeterThoeny - 25 Nov 2000

TopicClassification:
FeatureDone
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2000-11-26 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.