1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2024-12-11 22:35:20 +01:00

- [fediverse] ensured using original content's post as quoted text in a reply.

This commit is contained in:
cage 2024-11-09 14:04:12 +01:00
parent 38d222904b
commit beaf5e27c7
3 changed files with 9 additions and 3 deletions

View File

@ -144,6 +144,10 @@
(defun strip-footnote-reference-word (word)
(cl-ppcre:regex-replace scanner word "")))
(let ((scanner (cl-ppcre:create-scanner (footnote-reference-re :enforce-end-string nil))))
(defun strip-all-footnote-reference (string)
(cl-ppcre:regex-replace-all scanner string "")))
(defun block-tag-p (node)
(and (consp node)
(member node

View File

@ -529,6 +529,7 @@
:node->link
:append-footnote-reference
:strip-footnote-reference-word
:strip-all-footnote-reference
:footnote-reference-re
:html->text))

View File

@ -1326,8 +1326,7 @@ It an existing file path is provided the command will refuse to run."
:direction :output
:if-exists :supersede
:if-does-not-exist :error)
(write-sequence (html-utils:strip-footnote-reference-word body)
stream))
(write-sequence body stream))
(croatoan:end-screen)
(tui:with-notify-errors
(os-utils:open-with-editor temp-file))
@ -1384,7 +1383,9 @@ It an existing file path is provided the command will refuse to run."
;; in db (folder, timeline).
(when-let* ((message (db:find-message-id reply-id))
(reply-username (db:row-message-username message))
(rendered-text (db:row-message-rendered-text message))
(content (db:row-message-content message))
(rendered-text (msg-utils:message-original->text-body content
:add-link-footnotes nil))
(lines (split-lines rendered-text))
(quote-mark (swconf:quote-char))
(quoted-text (strcat quote-mark