Hello,

Dov Grobgeld <dov.grobg...@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

Reply via email to