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

Checklists break (markdown) styled text in description field #2109

Closed
hrk opened this issue Jul 9, 2020 · 7 comments · Fixed by #3898
Closed

Checklists break (markdown) styled text in description field #2109

hrk opened this issue Jul 9, 2020 · 7 comments · Fixed by #3898

Comments

@hrk
Copy link

hrk commented Jul 9, 2020

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Describe the bug
Styled text is broken when using checklists.

This happens with the new markdown-it engine, can't check the old engine.

To Reproduce
Steps to reproduce the behavior:

  1. Create new task in a stack
  2. Put a styled checklist
  3. Switch to view/preview
  4. See broken style

Expected behavior
View correctly styled text

Screenshots
Put the following text in a new task in Deck and in https://markdown-it.github.io/

- [X] Completed task
- [ ] Open task
- [ ] ~~Canceled task, would like to have a strikethrough~~ with further comments explaining the reason for the strikethrough.
- [X] _Don't really need it myself, but italic is broken too_
- [x] __As is bolded text__

Client details:

  • OS: Linux
  • Browser: Firefox (didn't test others)
  • Version: 68.10.0esr
  • Device: personal workstation
Server details

Operating system: Linux (Gentoo)

Web server: Apache 2.4.41

Database: PostgreSQL

PHP version: 7.4.6

Nextcloud version: 18.0.6

Where did you install Nextcloud from: official Gentoo ebuild repository

Signing status:

 files_rightclick
	- EXTRA_FILE
		- README.md

List of activated apps:

Enabled:
  - accessibility: 1.4.0
  - activity: 2.11.0
  - cloud_federation_api: 1.1.0
  - comments: 1.8.0
  - dav: 1.14.0
  - deck: 1.0.4
  - federatedfilesharing: 1.8.0
  - federation: 1.8.0
  - files: 1.13.1
  - files_pdfviewer: 1.7.0
  - files_rightclick: 0.15.2
  - files_sharing: 1.10.1
  - files_trashbin: 1.8.0
  - files_versions: 1.11.0
  - files_videoplayer: 1.7.0
  - firstrunwizard: 2.7.0
  - logreader: 2.3.0
  - lookup_server_connector: 1.6.0
  - nextcloud_announcements: 1.7.0
  - notes: 3.6.0
  - notifications: 2.6.0
  - oauth2: 1.6.0
  - password_policy: 1.8.0
  - photos: 1.0.0
  - privacy: 1.2.0
  - provisioning_api: 1.8.0
  - recommendations: 0.6.0
  - serverinfo: 1.8.0
  - settings: 1.0.0
  - sharebymail: 1.8.0
  - support: 1.1.1
  - survey_client: 1.6.0
  - systemtags: 1.8.0
  - tasks: 0.13.1
  - text: 2.0.0
  - theming: 1.9.0
  - twofactor_backupcodes: 1.7.0
  - updatenotification: 1.8.0
  - viewer: 1.2.0
  - workflowengine: 2.0.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - user_ldap

Nextcloud configuration:

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "roma2.sineo.it"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "18.0.6.0",
        "overwrite.cli.url": "https:\/\/roma2.sineo.it\/nextcloud",
        "htaccess.RewriteBase": "\/nextcloud",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "loglevel": 2,
        "maintenance": false,
        "theme": ""
    }
}

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

@hrk
Copy link
Author

hrk commented Jul 9, 2020

Screenshots of the bug https://imgur.com/a/nPp6bma

@hrk hrk changed the title Checklists break markdown Checklists break (markdown) styled text in description field Jul 9, 2020
@hrk
Copy link
Author

hrk commented Jul 12, 2020

FWIW: I inspected the code and the issue lies in the imported library markdown-it-task-lists which, unfortunately, seems to be abandoned. There is an issue (revin/markdown-it-task-lists#27) w/ an (unproper) pull request (revin/markdown-it-task-lists#29).
The issue has been closed by the reporter due to the abandoned status of the library, claiming that there's another library handling it correctly (https://github.com/linsir/markdown-it-task-checkbox).
This library is available in NPM too (https://www.npmjs.com/package/markdown-it-task-checkbox).

@hrk
Copy link
Author

hrk commented Jul 15, 2020

FWIW, maybe the best approach would be dropping markdown-it altogether and move to Nextcloud Text engine? https://nextcloud.com/blog/nextcloud-introduces-collaborative-rich-text-editor/

The Nextcloud Notes app is doing the same (nextcloud/notes#331)

@juliusknorr
Copy link
Member

That is the plan actually, yes 😁

See #1663

@hrk
Copy link
Author

hrk commented Jul 15, 2020

Thank you very much :)

@floogy
Copy link

floogy commented Nov 11, 2020

@juliushaertl Phew! I was just browsing Issues to see if I needed to report another one with Checklists in Descriptions.

Namely, if a grave accent (aka backtick) is used to emphasize code in a checklist item, everything before that character is repeated in View mode. It's not repeated when you switch back to Edit mode.

For example, this in Edit mode:

  • File bug report with NC Deck over rendered word repetition before code markdown delimiter

Renders like this in View mode:

  • File bug report with NC Deck over rendered word repetition before code File bug report with NC Deck over rendered word repetition before code markdown delimiter

@q-wertz
Copy link
Contributor

q-wertz commented Apr 11, 2022

Are there any news on this? The pull request to use the NC text app was closed due to lack of time.

Is there a chance that the move to https://github.com/linsir/markdown-it-task-checkbox as written by @hrk takes less effort but fixes it quickly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants