Revision 13709
Added by Aaron Marcuse-Kubitza over 10 years ago
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 any comment prefix: c:x@url -> x@url |
|
15 |
# remove any comment prefix: c:d:x@url -> x@url
|
|
16 | 16 |
# *note*: when URL is used without http:// , you must include a non-letter |
17 | 17 |
# in the comment (eg. c_:x@url) to work in Firefox |
18 | 18 |
# to put the comment on a separate line when word-wrapping, use c-_:x@url |
19 | 19 |
# (the _ is needed to work in Google spreadsheets) |
20 |
$elems = explode(':', $path, 2); |
|
21 |
$path = array_pop($elems); # last (comment is first) |
|
20 |
$path = preg_replace('/^.*:/', '', $path); |
|
22 | 21 |
|
23 | 22 |
# translate reverse @-paths into forward .-paths |
24 | 23 |
$path = implode(".", array_reverse(explode("@", $path))); |
Also available in: Unified diff
web/username_prefix.php: comment prefixes: support embedded ":" in comment