Project

General

Profile

« Previous | Next » 

Revision 13720

web/username_prefix.php: added support for deletion comments of the form (c_)x(_d)@url -> c_x_d@url . deletion indicates that the semantic meaning of the () portion does not apply, even though it's included in the linked term name.

View differences:

trunk/web/username_prefix.php
16 16
	# the _ are needed to work in Google spreadsheets
17 17
	$path = str_replace('_-_', '', $path);
18 18
	
19
	# remove comments: [c]x[d]@url -> x@url
19
	# remove insertion comments: [c]x[d]@url -> x@url
20 20
	# use [] because in writing, [] denotes insertion
21 21
	# can't use : for this because Firefox will not update the "password" for
22 22
	#  the website with the new value after the :
23 23
	$path = preg_replace('/\[.*?\]/', '', $path);
24 24
	
25
	# remove deletion comments: (c_)x(_d)@url -> c_x_d@url
26
	# use () because in editing, () denotes something to remove
27
	# deletion indicates that the semantic meaning of the () portion does not
28
	#  apply, even though it's included in the linked term name
29
	$path = preg_replace('/[()]/', '', $path);
30
	
25 31
	# translate reverse @-paths into forward .-paths
26 32
	$path = implode(".", array_reverse(explode("@", $path)));
27 33
	

Also available in: Unified diff