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

chore: updated handling of markdown headers #3896

Merged
merged 4 commits into from
Dec 25, 2024

Conversation

Goldziher
Copy link
Collaborator

Checklist

  • yarn typecheck
  • yarn lint:fix
  • yarn test
  • yarn brl
  • yarn changeset
  • ui changelog

This PR updates the handling of headers when deserializing markdown. Tests have been updated as well.

Copy link

codesandbox bot commented Dec 21, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

changeset-bot bot commented Dec 21, 2024

⚠️ No Changeset found

Latest commit: 82c54ce

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Dec 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
plate ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 21, 2024 1:22pm

const type = options.editor.getType({ key: headingType });

if (!type) {
console.warn(`Heading type ${headingType} not registered in editor`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we want to warn here. We could default to the latest heading type supported (e.g. h3)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the issue with this is that h3 will be confusing. Its difficult to understand the issue otherwise. I will keep it on p unless you insist.

@zbeyens
Copy link
Member

zbeyens commented Dec 21, 2024

Looks good, just need to fix the CI

@Goldziher Goldziher changed the base branch from main to update-markdown-handling December 25, 2024 08:13
@Goldziher Goldziher merged commit a9bc5a9 into udecode:update-markdown-handling Dec 25, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants