Ensure list depth cannot be negative

This commit is contained in:
Stanley Jaddoe 2021-01-21 17:21:13 +01:00 committed by Correl
parent 38a293e507
commit 093cdc2e07

View file

@ -312,8 +312,8 @@ holding contextual information."
Used while building lists as tables, where the nested depth is
tracked as a property in INFO."
(let ((nested (plist-get info :ox-confluence-en-nested)))
(- (org-confluence--li-depth item)
(or nested 0))))
(max 0 (- (org-confluence--li-depth item)
(or nested 0)))))
(defun ox-confluence-en-timestamp (timestamp contents info)
"Transcode a TIMESTAMP from Org to Confluence wiki markup.