[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Newline woes when exporting to mediawiki markup
From: |
Nicolas Goaziou |
Subject: |
Re: Newline woes when exporting to mediawiki markup |
Date: |
Tue, 01 Jun 2021 11:08:00 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hello,
Dov Grobgeld <dov.grobgeld@gmail.com> writes:
> I tried to modify ox-mediawiki.el to solve the following two issues:
>
> - Get rid of redundant newlines between exported list items
> - Replicate the leading asterisk to reflect the indentation level of the
> list.
>
> To get of the newline I tried to rewrite the org-export "item" translation
> function `org-mw-item` but I would either get no newlines at all between my
> items, or an extra newline between two subsequent items.
>
> I just noted that ox-mediawiki is derived from the html backend, so perhaps
> the limitations are there.
>
> I would appreciate any guidance of how to fix this.
It's difficult to answer since I know neither what you tried nor what is
correct syntax, but I think asterisks could be obtained with
(let ((level
;; Level can be seen as the number of parent plain lists.
(length (org-element-map (org-element-lineage item) 'plain-list
#'identity info))))
(make-string level ?*))
To remove any newline, you may try
(org-element-put-property item :post-blank 0)
prior to returning.
Regards,
--
Nicolas Goaziou