Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing a section edits the entire page, but cuts off the last 2 characters. #69

Open
Jonathan-Richards opened this issue Oct 21, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@Jonathan-Richards
Copy link

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.

@Monklite
Copy link

Monklite commented Oct 21, 2020

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

@mizunashi-mana mizunashi-mana added the need feedback More information is needed label Oct 25, 2020
@mizunashi-mana
Copy link
Owner

@Jonathan-Richards @legofarmer Thanks for reports. Could you give me any reproducible page contents?

@jonathan-golorry
Copy link

<markdown>
# header 1

## header 2

</markdown>

@jonathan-golorry
Copy link

jonathan-golorry commented Oct 26, 2020

===== 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).

@mizunashi-mana
Copy link
Owner

@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.

@mizunashi-mana mizunashi-mana added bug Something isn't working and removed need feedback More information is needed labels Oct 30, 2020
@jonathan-golorry
Copy link

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.

@Fortyseven
Copy link

Experiencing this, myself. I'll keep an eye out on what I'm doing to see if I can reliably reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants