dokuwiki-plugin-mdpage
dokuwiki-plugin-mdpage copied to clipboard
Editing a section edits the entire page, but cuts off the last 2 characters.
This is a bug report.
Name | Value |
---|---|
DokuWiki Version | 2020-07-29 "Hogfather" |
PHP Version | 7.4.6 |
OS | Darwin |
Web Server | Apache/2.4.46 (Unix) PHP/7.4.6 |
Details:
The "edit" button next to each header doesn't seem to respect markdown sections properly. If I click on one in a markdown block, it starts editing the entire page, but it cuts off the last 2 characters. In my case, this usually breaks the </markdown>
tag by replacing it with </markdow
, but it's always just the last two characters.
Same issues for me.
The way I'm currently getting around it is by specifying markdown tags in each heading like this:
====== header 1 ======
<markdown>
Content
</markdown>
===== header 2 =====
<markdown>
Content
</markdown>
It's not convenient, but it makes section editing work as intended
@Jonathan-Richards @legofarmer Thanks for reports. Could you give me any reproducible page contents?
<markdown>
# header 1
## header 2
</markdown>
===== section 1 =====
<markdown>
# header 1
## header 2
</markdown>
===== section 2 =====
This is also an interesting example. You get 3 edit buttons: one for header 1, one for section 1, and one for section 2. Keep in mind that the edit button appears at the end of the block defined by a header/section title. Editing the sections works properly, but editing the header is the whole page (minus 2 characters).
@jonathan-golorry Thanks for examples.
The "edit" button next to each header doesn't seem to respect markdown sections properly.
Unfortunately, this is not a bug but is according to the spec. This plugin respects standard renderer of DokuWiki as possible. However, DokuWiki is less extensible and pluggable for syntax plugins and has some strange behavior which breaks coherence with syntax plugins. We should not use standard renderer to avoid its behavior, but because the purpose of this plugin is the less maintain cost and the coherent with DokuWiki styles, I will keep using standard renderer.
Editing the sections works properly, but editing the header is the whole page (minus 2 characters).
I confirmed this unexpected behavior. I will try to fix this issue.
I'm not sure if this is related, but I've also noticed a rare bug when editing the entire page where a newline gets inserted before the last two characters, so it looks like:
</markdow
n>
I'm not sure how to reproduce it. It might be related to the lock expiring or having the page open in multiple tabs.
Experiencing this, myself. I'll keep an eye out on what I'm doing to see if I can reliably reproduce it.