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:
parent
1f0cc71884
commit
aae3aed7d4
@ -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)
|
||||
|
@ -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 " ")
|
||||
|
Loading…
Reference in New Issue
Block a user