Skip to content

Commit

Permalink
urls(value->param-value): Review documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
aadcg committed Feb 26, 2024
1 parent dd07621 commit d63c16c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions source/urls.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,10 @@ Authority is compared case-insensitively (RFC 3986)."

(-> value->param-value (t) (values string &optional))
(defun value->param-value (value)
"Turns the VALUE into a `query-params->arglist'-readable representation.
- If VALUE is a string, return it as-is.
- Otherwise, print it so string and prepend `+escape+' in front of it to notify
the `query-params->arglist' that it should be READ by CL reader."
"Turn VALUE into a representation readable by `query-params->arglist'."
(if (stringp value)
value
;; This is to safely parse the args afterwards
;; As to notify query-params->arglist.
(str:concat +escape+ (let ((*package* (find-package :nyxt)))
(prin1-to-string value)))))

Expand Down

0 comments on commit d63c16c

Please sign in to comment.