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

[Notebook] Fixes for Markdown in Notebook entries #7119

Closed
7 tasks
charlesh88 opened this issue Oct 5, 2023 · 3 comments · Fixed by #7115
Closed
7 tasks

[Notebook] Fixes for Markdown in Notebook entries #7119

charlesh88 opened this issue Oct 5, 2023 · 3 comments · Fixed by #7115
Labels
Milestone

Comments

@charlesh88
Copy link
Contributor

Summary

There are a number of issues with markdown in Notebook entries that should be fixed:

  1. Block quotes are not being tokenized as such, but are instead being HTML-encoded: > block quote gets encoded as > block quote. Instead, block quotes should work as documented for vanilla markdown.
  2. Space before headings (H1, H2, etc.) is missing:

Desired output
image

Rendered output
image

CSS currently adds vertical space under the headings, but doesn't add it above. This was done to avoid adding unnecessary vertical space before headings when they're the first line in an entry. However, CSS can be properly written to avoid this and should be implemented here.

Steps to Reproduce

  1. In a Notebook entry, reproduce the identified issues above as noted.

Environment

  • Open MCT Version: 3.1.0
  • Deployment Type: /testathon
  • OS:
  • Browser:

Impact Check List

  • Data loss or misrepresented data?
  • Regression? Did this used to work or has it always been broken?
  • Is there a workaround available?
  • Does this impact a critical component?
  • Is this just a visual bug with no functional impact?
  • Does this block the execution of e2e tests?
  • Does this have an impact on Performance?

Additional Information

@scottbell
Copy link
Contributor

scottbell commented Oct 6, 2023

@charlesh88

Block quotes are not being tokenized as such, but are instead being HTML-encoded: > block quote gets encoded as > block quote. Instead, block quotes should work as documented for vanilla markdown.

I've got a fix for this in this PR.

Space before headings (H1, H2, etc.) is missing

This appears to be a Markdown thing, so I'm not sure we can change this. E.g., on both the Marked demo and here on Github's markdown editor, this markdown:

#       no spaces preserved
##    on any size

renders as:

no spaces preserved

on any size

@scottbell
Copy link
Contributor

To test:

  1. Create a blockquote in a notebook entry using markdown (using > characters)
  2. Ensure it appears indented in the code, and creates a <blockquote> in the HTML

@ozyx ozyx added this to the Target:3.2.0 milestone Oct 23, 2023
@shefalijoshi
Copy link
Contributor

Verified fixed

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