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

fix: add missing TableCell token to MarkedToken #3584

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MrMarble
Copy link

Marked version: v15.0.6

Markdown flavor: n/a

Description

  • Fixes TableCell not exported as MarkedToken

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
  • no tests required for this PR.
  • If submitting new feature, it has been documented in the appropriate places.

Committer

In most cases, this should be a different person than the contributor.

Copy link

vercel bot commented Jan 12, 2025

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

Name Status Preview Comments Updated (UTC)
marked-website ❌ Failed (Inspect) Jan 12, 2025 9:37am

@UziTech
Copy link
Member

UziTech commented Jan 12, 2025

TableCell is not like the other tokens, it does not have type or raw properties, which is why the tests are failing.

Is there a reason you need TableCell exported in MarkedToken?

Checkbox and TableRow are similar tokens that are not exported in MarkedToken.

@MrMarble
Copy link
Author

When creating an extension that overrides the renderer, you might get a type error because Tokens.TableCell does not satisfy Token.
Honestly I thought it was a mistake that the type was left over, if it was on purpose then this can be closed

@UziTech
Copy link
Member

UziTech commented Jan 12, 2025

Can you give an example of an extension that doesn't work? I think it would be fine to add all of the tokens to MarkedToken but it might be a lot of work.

@UziTech
Copy link
Member

UziTech commented Jan 12, 2025

Looks like MarkedToken is only used in the Parser where the token won't ever be a TableCell

const token = anyToken as MarkedToken;

Anywhere where we need any token including those not run through the Parser we use Token which is any token type.

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