]> Lady’s Gitweb - Shushe/commitdiff
Allow underscores in u·r·l’s
authorLady <redacted>
Fri, 19 Jan 2024 04:22:32 +0000 (23:22 -0500)
committerLady <redacted>
Fri, 19 Jan 2024 04:22:32 +0000 (23:22 -0500)
Somehow I missed allowing these the first time.

GNUmakefile

index ee342ec1a1f627026ce2df8f527b0775ddd3a3c0..53db7f25eeb1ca9555dcd9852f5c9553c57b8c4d 100644 (file)
@@ -218,9 +218,11 @@ override perdec = $(foreach encoded,$1,$(shell $(PRINTF) '%s\n' $(call quote,$(e
 # The encoding assumes the input is a “u·r·i component”; e·g that the
 # resulting string should only contain `pchar´ (but can contain any
 # `sub-delim´).
 # The encoding assumes the input is a “u·r·i component”; e·g that the
 # resulting string should only contain `pchar´ (but can contain any
 # `sub-delim´).
-override perenc = $(foreach unencoded,$1,$(call perdec,$(shell $(PRINTF) '%s' $(call quote,$(unencoded)) | $(OD) -t x1 | $(SED) 's/^[0-9]*//;s/2[146-9A-Ea-e]/%&/g;s/3[0-9AaBbDd]/%&/g;s/40/%&/g;s/[46][1-9A-Fa-f]/%&/g;s/[57][0-9Aa]/%&/g;s/7[Ee]/%&/g;s/[ ][0-9A-Fa-f]\{2\}/%25&/g' | $(TR) -d ' \n' | $(TR) 'abcdef' 'ABCDEF')))
+override perenc = $(foreach unencoded,$1,$(call perdec,$(shell $(PRINTF) '%s' $(call quote,$(unencoded)) | $(OD) -t x1 | $(SED) 's/^[0-9]*//;s/2[146-9A-Ea-e]/%&/g;s/3[0-9AaBbDd]/%&/g;s/40/%&/g;s/[46][1-9A-Fa-f]/%&/g;s/[57][0-9Aa]/%&/g;s/5[Ff]/%&/g;s/7[Ee]/%&/g;s/[ ][0-9A-Fa-f]\{2\}/%25&/g' | $(TR) -d ' \n' | $(TR) 'abcdef' 'ABCDEF')))
 
 # (callable) Percent‐encode each component in the given paths.
 
 # (callable) Percent‐encode each component in the given paths.
+#
+# ☡ This will remove leading and trailing slashes.
 override pathenc = $(foreach path,$1,$(subst $(space),/,$(call perenc,$(subst /, ,$(path)))))
 
 # (overridable) Collect all of the applicable includes from the
 override pathenc = $(foreach path,$1,$(subst $(space),/,$(call perenc,$(subst /, ,$(path)))))
 
 # (overridable) Collect all of the applicable includes from the
This page took 0.122239 seconds and 4 git commands to generate.