turnermm / ckgedit

CKEditor integrated into Dokuwiki
https://www.dokuwiki.org/plugin:ckgedit
GNU General Public License v2.0
60 stars 49 forks source link

bug in bullet list with links and text that starts with "-" #371

Closed bcristian closed 6 years ago

bcristian commented 6 years ago

To reproduce, create an empty page and put in the corresponding text file the following: * [[https://www.google.com/]] - google Note the space - minus - space between the link and the text View the page, and it will show as expected, bullet, "external url" class link, space - minus - space google on the same line. Edit the page, change a letter (or anything), so that a new version of the page is actually saved, and see that the text after the link has been moved in a paragraph instead, breaking the list. The change is present in the txt file as well, where the text after the link is placed on the next line after the link.

The bug does not happen if either the first space is removed or the minus is removed or replaced with another character (tried a letter, a digit, plus). It also does not happen in the DW editor, so it seems to me that CKG is the most likely source of the issue.

turnermm commented 6 years ago

I haven't investigated but I suspect that the parser is mistaking the hyphen for an ordered list mark but can't handle it because it's in the middle of a line. In the mean time, escape the hyphen: %%-%%. When the list is loaded back into ckgedit it will look like this: <nowiki>-</nowiki> and in the Dokuwiki editor you will have: * [[https://www.google.com/|https://www.google.com/]] <nowiki>-</nowiki> google

Floffyko commented 6 years ago

Talking about Lists:

Server 1: Windows

Server 2 Linux based

Lists are broken to a second edit sesion.

We have in DW EDit:

  * Unordered List
  * Unordered List 2
      * Unordered List 3

CKG edit will transform it in : <div class="level2">* Unordered List * Unordered List 2 * Unordered List 3</div>

What will brake every list ever made with DW EDIt or ckgEdit. In fact the editor is not usable if in text is any list. it wil all look like this: * Unordered List * Unordered List 2 * Unordered List 3 The same behavior with ckgdoku

Where could be the problem? It has to be a setting problem. I installed it severel times, the two versions... No success.

Thanks for your nice work :)

turnermm commented 6 years ago

I'm afraid I can't reproduce this error. I tested in Frusterick Manners and an older distribution of Dokuwiki: Detritus. I also tested in Safari, on a MacBook.

My tests include use of php 7.1 and 5.6. I see you went on to test in 5.6, 5.3 is no longer supported.

This is a test page where I made repeated entries into the nested list and repeated saves: https://mturner.org/devel/playground/nested_lists

I would suggest that you test against any plugins that you may have installed.

turnermm commented 6 years ago

In fact, if the editor becomes unusable, then I suspect an incompatible plugin.

With such a basic function as this, I would have heard about it from a lot of users by now. The issue that you are attaching to, the mid line hyphen, is not the same as this.

Floffyko commented 6 years ago

100 % plugin incompatibility ! You were right.

yalist plugin is incompatible with ckg of any flavour. please write it on the list of incompatible plug-ins.

Thanks for the tip

turnermm commented 6 years ago

The conflict has been listed for some time in the conflicts field of the header of both plugins, just below the Repository listing, where it says Conflicts with.

Floffyko commented 6 years ago

Dear users, check the conflict list twice before raising any questions...