samwilson / dokuwiki-plugin-definitionlist

Add definition list syntax to DokuWiki.
https://www.dokuwiki.org/plugin:definitionlist
0 stars 4 forks source link

ODT export failure if definition list is last content #7

Closed lpaulsen93 closed 7 years ago

lpaulsen93 commented 10 years ago

The export to ODT creates a faulty file (faulty ODT XML syntax) if the definition list is the last content on a wiki page. This means there is nothing or just whitespace following the end of the definition list on a wiki page.

The problem can be fixed like this:

        case DOKU_LEXER_EXIT:
            if ($tag != 'dl') {
                $renderer->p_close();
            } else {
                // Remove this line and it will work!
                //$renderer->p_open();
            }
            break;

So, simply delete that line in function render_odt and the bug will be fixed. Greetings, Lars (DokuWiki-User LarsDW223)

lpaulsen93 commented 7 years ago

This can be closed as paragraph opening and closing has been improved in the ODT plugin itself.