Revision 14118
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/web/username_prefix.php | ||
---|---|---|
12 | 12 |
# remove padding used to visually separate elements:__x__@y__@url -> x@y@url |
13 | 13 |
$path = preg_replace('/\b__|__\b/', '', $path); |
14 | 14 |
|
15 |
# remove category comments: x+y@url -> y@url |
|
16 |
# this special syntax is shorter than [x]_-_y@url |
|
17 |
# a UI can replace + with ' ' to produce a linewrap |
|
18 |
# can't use : for this because Firefox will not update the "password" for |
|
19 |
# the website with the new value after the : |
|
20 |
$path = preg_replace('/^.*?\+/', '', $path); |
|
21 |
|
|
22 | 15 |
# remove insertion comments: [c]x[d]@url -> x@url |
23 | 16 |
# use [] because in writing, [] denotes insertion |
24 | 17 |
# insertion indicates that the semantic meaning of the [] portion also |
... | ... | |
37 | 30 |
|
38 | 31 |
# undo transposes: y~x_@url -> x_y@url , Y~x@url -> xY@url |
39 | 32 |
# these can be used to put the category in a column name first |
33 |
# can't use : for this because Firefox will not update the "password" for |
|
34 |
# the website with the new value after the : |
|
40 | 35 |
$path = preg_replace('/([^.]*)~([^.]*)/', '$2$1', $path); |
41 | 36 |
|
42 | 37 |
return $path; |
Also available in: Unified diff
web/username_prefix.php: removed special category comments syntax because this is now handled by transposes and insertion comments