1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2024-12-17 23:18:28 +01:00

- made 'text-utils:strim-blanks' returns nil and not "NIL" when input is null;

- [gemini] trim whitespaces from link name.
This commit is contained in:
cage 2021-01-24 12:18:29 +01:00
parent 1f0cc71884
commit aae3aed7d4
2 changed files with 7 additions and 2 deletions

View File

@ -116,7 +116,7 @@
(:function (lambda (a)
(list (first a)
(list (list :href (second a)))
(second (third a))))))
(text-utils:trim-blanks (second (third a)))))))
(defrule h1 (and h1-prefix
text-line)

View File

@ -240,9 +240,14 @@ Uses `test' to match strings (default #'string=)"
(defvar *blanks* '(#\Space #\Newline #\Backspace #\Tab
#\Linefeed #\Page #\Return #\Rubout))
(defun trim-blanks (s)
(defgeneric trim-blanks (s))
(defmethod trim-blanks ((s string))
(string-trim *blanks* s))
(defmethod trim-blanks ((s null))
s)
(defun justify-monospaced-text (text &optional (chars-per-line 30))
(if (null (split-words text))
(list " ")