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

Incorrect Task List syntax #1297

Closed
broslavski opened this issue Dec 23, 2020 · 5 comments · Fixed by #3523
Closed

Incorrect Task List syntax #1297

broslavski opened this issue Dec 23, 2020 · 5 comments · Fixed by #3523
Labels
1. to develop dependencies: javascript enhancement New feature or request feature: formatting Features related to text formatting and node types format: markdown

Comments

@broslavski
Copy link

broslavski commented Dec 23, 2020

Describe the bug
When creating a tasklist with checkboxes, the markdown code of the note is being created inconsistent with GitHub Markdown Guide and Extended Syntax of Markdown Guide.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new file
  2. Open the file using NextCloud text
  3. Create Task List and wait until file is saved
  4. Open the Markdown code of the note.
  5. Each item in the list is displayed as * [ ] but not as - [ ]

Also, a previously saved note with correct syntax is converted to invalid when it is re-saved.

Expected behavior
Each item in the Task List must begin with - [ ].

Text app version:
3.1.0

@jancborchardt
Copy link
Member

For uniformity we should probably just use the - dash for both lists and task lists exclusively, those are also the first recommendations of the basic guides for normal unordered lists.

@jancborchardt jancborchardt added 1. to develop feature: formatting Features related to text formatting and node types labels Feb 10, 2021
@juliusknorr
Copy link
Member

Using * [ ] is perfectly valid GDM markdown according to https://github.github.com/gfm/#task-list-item-marker but I agree that using - is probably a nicer plaintext default.

@juliusknorr juliusknorr added enhancement New feature or request format: markdown and removed bug Something isn't working labels May 13, 2022
@vinicius73
Copy link
Member

@juliusknorr
Copy link
Member

We already have the option to change the default with the bullet parameter, and we also extend the rendering and have our custom toMarkdown methods:

src/nodes/TaskList.js
35:		state.renderList(node, '  ', () => (node.attrs.bullet || '*') + ' ')

@vinicius73
Copy link
Member

We already have the option to change the default with the bullet parameter, and we also extend the rendering and have our custom toMarkdown methods:

I've already tested it, but didn't work in my test, I can try more later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop dependencies: javascript enhancement New feature or request feature: formatting Features related to text formatting and node types format: markdown
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants