head	1.1;
access;
symbols
	RELEASE_8_3_0:1.1
	RELEASE_9_0_0:1.1
	RELEASE_7_4_0:1.1
	RELEASE_8_2_0:1.1
	RELEASE_6_EOL:1.1
	RELEASE_8_1_0:1.1
	RELEASE_7_3_0:1.1
	RELEASE_8_0_0:1.1
	RELEASE_7_2_0:1.1
	RELEASE_7_1_0:1.1
	RELEASE_6_4_0:1.1
	RELEASE_5_EOL:1.1
	RELEASE_7_0_0:1.1
	RELEASE_6_3_0:1.1
	PRE_XORG_7:1.1
	RELEASE_4_EOL:1.1
	RELEASE_6_2_0:1.1
	RELEASE_6_1_0:1.1
	RELEASE_5_5_0:1.1
	RELEASE_6_0_0:1.1
	RELEASE_5_4_0:1.1
	RELEASE_4_11_0:1.1
	RELEASE_5_3_0:1.1
	RELEASE_4_10_0:1.1
	RELEASE_5_2_1:1.1
	RELEASE_5_2_0:1.1
	RELEASE_4_9_0:1.1
	RELEASE_5_1_0:1.1
	RELEASE_4_8_0:1.1
	RELEASE_5_0_0:1.1
	RELEASE_4_7_0:1.1
	RELEASE_4_6_2:1.1
	RELEASE_4_6_1:1.1
	RELEASE_4_6_0:1.1
	RELEASE_5_0_DP1:1.1
	RELEASE_4_5_0:1.1;
locks; strict;
comment	@# @;


1.1
date	2001.11.22.15.26.43;	author phantom;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Add new option '-preserve' to preserve characters entities from source file
(i.e. leave them undecoded into plain characters). This feature will be utilized
by translation teams and was successfuly tested against Russian and Japanese
Translation Projects.

Also add simple hack to not to display annoying "Can't open ~/.tidyrc" warning
message in case if ~/.tidyrc file missing.

Bump PORTREVISION.

Approved by:    Scott Kenney <saken@@hotel.rmta.org> (maintainer)
Tested by:      myself, hrs
@
text
@--- lexer.c.orig	Fri Aug  4 19:21:05 2000
+++ lexer.c	Thu Nov 15 21:44:03 2001
@@@@ -1517,8 +1517,10 @@@@
 
                     continue;
                 }
-                else if (c == '&' && mode != IgnoreMarkup)
-                    ParseEntity(lexer, mode);
+                else if (c == '&' && mode != IgnoreMarkup
+				&& !PreserveEntities) {
+               		ParseEntity(lexer, mode);
+		}
 
                 /* this is needed to avoid trimming trailing whitespace */
                 if (mode == IgnoreWhitespace)
@@@@ -2624,7 +2626,7 @@@@
                 seen_gt = yes;
         }
 
-        if (c == '&')
+        if (c == '&')	/* XXX: possibly need support for PreserveEntities */
         {
             AddCharToLexer(lexer, c);
             ParseEntity(lexer, null);
@
