mirror of https://codeberg.org/cage/tinmop/
- [fediverse] rendered correctly ordered list;
- fixed indentation of configure.ac; - removed useless command in Makefile.
This commit is contained in:
parent
2cf9b31a4b
commit
82bdf5c538
|
@ -95,12 +95,12 @@ data/scripts/welcome-bot.lisp
|
||||||
dist_man1_MANS = doc/tinmop.man
|
dist_man1_MANS = doc/tinmop.man
|
||||||
|
|
||||||
$(PACKAGE): $(CONF_PATH_FILE) *.asd src/*
|
$(PACKAGE): $(CONF_PATH_FILE) *.asd src/*
|
||||||
cd $$(dirname $$($(LISP_COMPILER) --noinform --eval "(format t \"~a\" *core-pathname*)" --eval "(sb-ext:quit)")) && \
|
|
||||||
$(LISP_COMPILER) \
|
$(LISP_COMPILER) \
|
||||||
--eval "(push \"$$(pwd)/\" asdf:*central-registry*)" \
|
--eval "(push \"$$(pwd)/\" asdf:*central-registry*)" \
|
||||||
--eval "(asdf:make '$(PACKAGE) :build-pathname \"../$(PACKAGE)\")" \
|
--eval "(asdf:make '$(PACKAGE) :build-pathname \"../$(PACKAGE)\")" \
|
||||||
--eval "(uiop:quit)"
|
--eval "(uiop:quit)"
|
||||||
mv src/tinmop $(PACKAGE)
|
mv src/tinmop $(PACKAGE)
|
||||||
|
|
||||||
$(CONF_PATH_FILE):
|
$(CONF_PATH_FILE):
|
||||||
grep "^;" $(CONF_PATH_FILE_IN) > $(CONF_PATH_FILE)
|
grep "^;" $(CONF_PATH_FILE_IN) > $(CONF_PATH_FILE)
|
||||||
echo -e "(in-package :config)\n" >> $(CONF_PATH_FILE);
|
echo -e "(in-package :config)\n" >> $(CONF_PATH_FILE);
|
||||||
|
|
|
@ -1117,12 +1117,12 @@ uninstall-man: uninstall-man1
|
||||||
|
|
||||||
|
|
||||||
$(PACKAGE): $(CONF_PATH_FILE) *.asd src/*
|
$(PACKAGE): $(CONF_PATH_FILE) *.asd src/*
|
||||||
cd $$(dirname $$($(LISP_COMPILER) --noinform --eval "(format t \"~a\" *core-pathname*)" --eval "(sb-ext:quit)")) && \
|
|
||||||
$(LISP_COMPILER) \
|
$(LISP_COMPILER) \
|
||||||
--eval "(push \"$$(pwd)/\" asdf:*central-registry*)" \
|
--eval "(push \"$$(pwd)/\" asdf:*central-registry*)" \
|
||||||
--eval "(asdf:make '$(PACKAGE) :build-pathname \"../$(PACKAGE)\")" \
|
--eval "(asdf:make '$(PACKAGE) :build-pathname \"../$(PACKAGE)\")" \
|
||||||
--eval "(uiop:quit)"
|
--eval "(uiop:quit)"
|
||||||
mv src/tinmop $(PACKAGE)
|
mv src/tinmop $(PACKAGE)
|
||||||
|
|
||||||
$(CONF_PATH_FILE):
|
$(CONF_PATH_FILE):
|
||||||
grep "^;" $(CONF_PATH_FILE_IN) > $(CONF_PATH_FILE)
|
grep "^;" $(CONF_PATH_FILE_IN) > $(CONF_PATH_FILE)
|
||||||
echo -e "(in-package :config)\n" >> $(CONF_PATH_FILE);
|
echo -e "(in-package :config)\n" >> $(CONF_PATH_FILE);
|
||||||
|
|
|
@ -8132,7 +8132,7 @@ fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ac_header= ac_cache=
|
ac_header= ac_cache=
|
||||||
for ac_item in $ac_header_c_list
|
for ac_item in $ac_header_c_list
|
||||||
do
|
do
|
||||||
if test $ac_cache; then
|
if test $ac_cache; then
|
||||||
|
|
|
@ -167,7 +167,7 @@ AC_CHECK_LIB([turbojpeg], [tjInitDecompress], [], AC_MSG_ERROR([Can not find lib
|
||||||
|
|
||||||
dnl check headers
|
dnl check headers
|
||||||
|
|
||||||
AC_CHECK_HEADER([turbojpeg.h], [], [Can not find libturbojpeg0 headers file.], [])
|
AC_CHECK_HEADER([turbojpeg.h], [], [Can not find libturbojpeg0 headers file.], [])
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile quick_quicklisp.sh po/Makefile.in src/config.lisp.in])
|
AC_CONFIG_FILES([Makefile quick_quicklisp.sh po/Makefile.in src/config.lisp.in])
|
||||||
|
|
||||||
|
|
|
@ -17,21 +17,25 @@
|
||||||
|
|
||||||
(in-package :html-utils)
|
(in-package :html-utils)
|
||||||
|
|
||||||
(define-constant +tag-link+ "a" :test #'string=)
|
(define-constant +tag-link+ "a" :test #'string=)
|
||||||
|
|
||||||
(define-constant +tag-break+ "br" :test #'string=)
|
(define-constant +tag-break+ "br" :test #'string=)
|
||||||
|
|
||||||
(define-constant +tag-paragraph+ "p" :test #'string=)
|
(define-constant +tag-paragraph+ "p" :test #'string=)
|
||||||
|
|
||||||
(define-constant +tag-list-item+ "li" :test #'string=)
|
(define-constant +tag-ordered-list+ "ol" :test #'string=)
|
||||||
|
|
||||||
(define-constant +tag-div+ "div" :test #'string=)
|
(define-constant +tag-unordered-list+ "ul" :test #'string=)
|
||||||
|
|
||||||
(define-constant +tag-blockquote+ "blockquote" :test #'string=)
|
(define-constant +tag-list-item+ "li" :test #'string=)
|
||||||
|
|
||||||
(define-constant +attribute-url+ "href" :test #'string=)
|
(define-constant +tag-div+ "div" :test #'string=)
|
||||||
|
|
||||||
(define-constant +http-scheme+ "http" :test #'string=)
|
(define-constant +tag-blockquote+ "blockquote" :test #'string=)
|
||||||
|
|
||||||
|
(define-constant +attribute-url+ "href" :test #'string=)
|
||||||
|
|
||||||
|
(define-constant +http-scheme+ "http" :test #'string=)
|
||||||
|
|
||||||
(defun http-link-iri-p (iri)
|
(defun http-link-iri-p (iri)
|
||||||
(conditions:with-default-on-error (nil)
|
(conditions:with-default-on-error (nil)
|
||||||
|
@ -106,6 +110,12 @@
|
||||||
|
|
||||||
(defparameter *quote-level* 0)
|
(defparameter *quote-level* 0)
|
||||||
|
|
||||||
|
(defparameter *ordered-list* nil)
|
||||||
|
|
||||||
|
(defparameter *unordered-list* nil)
|
||||||
|
|
||||||
|
(defparameter *ordered-list-item-number* 0)
|
||||||
|
|
||||||
(defun html->text (html &key
|
(defun html->text (html &key
|
||||||
(add-link-footnotes t) (body-footnotes-separator "")
|
(add-link-footnotes t) (body-footnotes-separator "")
|
||||||
(quote-prefix "> ") (list-item-prefix "* "))
|
(quote-prefix "> ") (list-item-prefix "* "))
|
||||||
|
@ -166,11 +176,31 @@ Some convenience functions are provided to works with these structures.
|
||||||
(princ *prefix-text-line* body-stream)))
|
(princ *prefix-text-line* body-stream)))
|
||||||
(descend-children node)
|
(descend-children node)
|
||||||
(format body-stream "~%")))
|
(format body-stream "~%")))
|
||||||
|
((tag= +tag-unordered-list+ node)
|
||||||
|
(let ((*ordered-list* nil)
|
||||||
|
(*unordered-list* t))
|
||||||
|
(descend-children node)))
|
||||||
|
((tag= +tag-ordered-list+ node)
|
||||||
|
(let ((*ordered-list* t)
|
||||||
|
(*unordered-list* nil)
|
||||||
|
(*ordered-list-item-number* 0))
|
||||||
|
(descend-children node)))
|
||||||
((tag= +tag-list-item+ node)
|
((tag= +tag-list-item+ node)
|
||||||
(let ((*block-tag* nil))
|
(let ((*block-tag* nil))
|
||||||
(format body-stream list-item-prefix)
|
(cond
|
||||||
(descend-children node)
|
(*unordered-list*
|
||||||
(format body-stream "~%")))
|
(format body-stream list-item-prefix)
|
||||||
|
(descend-children node)
|
||||||
|
(format body-stream "~%"))
|
||||||
|
(*ordered-list*
|
||||||
|
(incf *ordered-list-item-number*)
|
||||||
|
(format body-stream "~a." *ordered-list-item-number*)
|
||||||
|
(descend-children node)
|
||||||
|
(format body-stream "~%"))
|
||||||
|
(t
|
||||||
|
(format body-stream "unknown list type ")
|
||||||
|
(descend-children node)
|
||||||
|
(format body-stream "~%")))))
|
||||||
((tag= +tag-blockquote+ node)
|
((tag= +tag-blockquote+ node)
|
||||||
(let ((*prefix-text-line* quote-prefix)
|
(let ((*prefix-text-line* quote-prefix)
|
||||||
(*quote-level* (1+ *quote-level*))
|
(*quote-level* (1+ *quote-level*))
|
||||||
|
|
|
@ -531,7 +531,8 @@ list of strings (the text lines)."
|
||||||
(win-close window)))
|
(win-close window)))
|
||||||
|
|
||||||
(defun make-dialog (parent title message style
|
(defun make-dialog (parent title message style
|
||||||
&optional (buttons nil)
|
&optional
|
||||||
|
(buttons nil)
|
||||||
(append-ok-button t))
|
(append-ok-button t))
|
||||||
(let* ((lines (text-utils:split-lines message))
|
(let* ((lines (text-utils:split-lines message))
|
||||||
(actual-buttons (if append-ok-button
|
(actual-buttons (if append-ok-button
|
||||||
|
|
Loading…
Reference in New Issue