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

Rewrite FormattedComponentArgument to use markdown #673

Merged
merged 4 commits into from
Nov 26, 2024

Conversation

Earthcomputer
Copy link
Owner

Rewrite the FormattedComponentArgument to use the following subset of markdown:

  • *italic*
  • _italic_
  • **bold**
  • __underline__
  • ~~strikethrough~~
  • [link](href)
  • \*escaped stuff\*

Also continues to allow more formatting in the old way:

red{hello blue{world}!}

Supports legacy formatting codes via the braces syntax:

c{hello 9{world}!}

Designed to help along #464

@Earthcomputer Earthcomputer requested a review from xpple November 23, 2024 16:25
@Earthcomputer Earthcomputer added the enhancement New feature or request label Nov 23, 2024
xpple
xpple previously requested changes Nov 24, 2024
Copy link
Collaborator

@xpple xpple left a comment

Choose a reason for hiding this comment

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

Looks good. Though as the argument type does not just support formatting - it also supports styling - I would rename the argument type to StyledComponentArgument.

I will test the workings of the argument type later.

@Earthcomputer Earthcomputer requested a review from xpple November 24, 2024 21:40
@Earthcomputer Earthcomputer dismissed xpple’s stale review November 26, 2024 19:24

comments addressed and tests added

@Earthcomputer Earthcomputer merged commit 131fb20 into fabric Nov 26, 2024
2 checks passed
@Earthcomputer Earthcomputer deleted the markdown-argument-type branch November 26, 2024 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants