Project

General

Profile

« Previous | Next » 

Revision 13733

web/username_prefix.php: deletion comments: require ... strikethrough on both () to avoid ambiguity when the deleted part starts or ends with -

View differences:

username_prefix.php
24 24
	#  the website with the new value after the :
25 25
	$path = preg_replace('/\[.*?\]/', '', $path);
26 26
	
27
	# remove deletion comments: (c_)x@url & (-c_-)x@url -> c_x@url
27
	# remove deletion comments: (-c_-)x@url -> c_x@url
28 28
	# use () because in editing, () denotes something to remove
29
	# the -...- indicate strikethrough (deletion)
29 30
	# deletion indicates that the semantic meaning of the () portion does not
30 31
	#  apply, even though it's included in the linked term name
31
	$path = preg_replace('/\(-?|-?\)/', '', $path);
32
	$path = preg_replace('/\(-([^)]*?)-\)/', '$1', $path);
32 33
	
33 34
	# translate reverse @-paths into forward .-paths
34 35
	$path = implode(".", array_reverse(explode("@", $path)));

Also available in: Unified diff