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

Markdown support #1299

Closed
8 of 10 tasks
Tracked by #1027
nickvergessen opened this issue Jul 11, 2023 · 4 comments · Fixed by #1328
Closed
8 of 10 tasks
Tracked by #1027

Markdown support #1299

nickvergessen opened this issue Jul 11, 2023 · 4 comments · Fixed by #1328

Comments

@nickvergessen
Copy link
Member

nickvergessen commented Jul 11, 2023

We plan to role out the following support for markdown:

non-optional

  • bold
  • italic

optional

Optional means it is just shown with the markdown syntax

  • strike-through
  • list
  • todo list with checkboxes
  • code block using 3 `
  • inline code using `
  • quote
  • headlines
  • dividers ---
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 💬 Talk team Jul 11, 2023
@nickvergessen nickvergessen moved this from 🧭 Planning evaluation (don't pick) to 📄 To do (~10 entries) in 💬 Talk team Jul 11, 2023
@SystemKeeper
Copy link
Collaborator

SystemKeeper commented Jul 12, 2023

Some research on this.

Apple native markdown implementation:

  • bold
  • italic
  • strike-through
  • list
  • todo list with checkboxes
  • code block using 3 ` (partially, is parsed as markdown, but removes newlines inside the 3 ` which renders it useless)
  • inline code using `
  • quote
  • headlines
  • dividers ---

👍 Native
👎 Hard to customize
👎 no newlines inside of the 3 ` renders it useless in my opinion

Down library https://github.com/johnxnguyen/Down

CDMarkdownKit https://github.com/chrisdhaan/CDMarkdownKit

  • bold
  • italic
  • strike-through
  • list (no sublists)
  • todo list with checkboxes
  • code block using 3 `
  • inline code using `
  • quote
  • headlines
  • dividers --- (Could possibly be added through custom syntax addition)

👍 Very easy to customize appearance
👎 Need to research missing indentation, spaces at the beginning of a line are removed

Comment

  • All 3 ways can parse a NSString to a NSAttributedString, so switching between the 3 ways is easy
  • Set up a test with all 3 ways, was very easy in all cases
  • CDMarkdownKit is very easily customizable

@SystemKeeper
Copy link
Collaborator

👎 Need to research missing indentation, spaces at the beginning of a line are removed

Works by removing
https://github.com/chrisdhaan/CDMarkdownKit/blob/b08981016f9406eb6d18150a3c8caa4288983d2e/Source/CDMarkdownParser.swift#L191-L199

So we could change this locally and provide a patch upstream.

@SystemKeeper
Copy link
Collaborator

Done in #1296

@github-project-automation github-project-automation bot moved this from 📄 To do (~10 entries) to ☑️ Done in 💬 Talk team Jul 19, 2023
@SystemKeeper SystemKeeper self-assigned this Jul 24, 2023
@nickvergessen
Copy link
Member Author

There is a markdown property on messages now. If that is false, all Markdown rendering should be disabled:
nextcloud/spreed#10067

@nickvergessen nickvergessen reopened this Jul 27, 2023
@github-project-automation github-project-automation bot moved this from ☑️ Done to 📄 To do (~10 entries) in 💬 Talk team Jul 27, 2023
@SystemKeeper SystemKeeper moved this from 📄 To do (~10 entries) to 🏗️ In progress in 💬 Talk team Jul 28, 2023
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 💬 Talk team Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants