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: replace any backticks (`) in manifestStr #196

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

Conversation

NeilHanlon
Copy link

Summary

if manifestStr (read from plugin.json) has any '' characters in it, such as when using markdown formatting in a text value, the generated go code fails to build due to unescaped '' characters, leading the compiler to believe some input is mismatched.

This change passes the manifestStr through a Replacement filter to replace the ` characters with input which will be properly formatted through the compiler.

Ticket Link

n/a

if manifestStr (read from plugin.json) has any '`' characters in it,
such as when using markdown formatting in a text value, the generated go
code fails to build due to unescaped '`' characters, leading the
compiler to believe some input is mismatched.

This change passes the manifestStr through a Replacement filter to
replace the ` characters with input which will be properly formatted
through the compiler.

Signed-off-by: Neil Hanlon <[email protected]>
@mattermost-build
Copy link
Contributor

Hello @NeilHanlon,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

Per the Mattermost Contribution Guide, we need to add you to the list of approved contributors for the Mattermost project.

Please help complete the Mattermost contribution license agreement?
Once you have signed the CLA, please comment with /check-cla and confirm that the CLA check is green.

This is a standard procedure for many open source projects.

Please let us know if you have any questions.

We are very happy to have you join our growing community! If you're not yet a member, please consider joining our Contributors community channel to meet other contributors and discuss new opportunities with the core team.

@NeilHanlon
Copy link
Author

/check-cla

Copy link
Contributor

@hanzei hanzei left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @NeilHanlon 👍

While the fix seems reasonable, I would like to see a test that verifies that the newly generated manifest is valid.

@NeilHanlon
Copy link
Author

Thanks for the contribution @NeilHanlon 👍

While the fix seems reasonable, I would like to see a test that verifies that the newly generated manifest is valid.

Absolutely! I will add some tests later--I also found an issue with the typescript generator, as well.. Will have to think about that a bit, unless you have any immediate thoughts on how to support markdown in plugin.json (e.g. https://github.com/rocky-linux/mattermost-plugin-community-toolkit/blob/master/plugin.json)

@mattermost-build
Copy link
Contributor

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!

@hanzei hanzei added Awaiting Submitter Action Blocked on the author and removed Lifecycle/1:stale labels Feb 29, 2024
@mattermost-build
Copy link
Contributor

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!

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

Successfully merging this pull request may close these issues.

3 participants