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

Plaint text without formating? #370

Open
rvalitov opened this issue Nov 30, 2024 · 7 comments
Open

Plaint text without formating? #370

rvalitov opened this issue Nov 30, 2024 · 7 comments

Comments

@rvalitov
Copy link

Hi! I need to print output from console, therefore it should be printed "as is", as a plain text with standard line endings and without markdown formatting. Is it possible to disable markdown formatting?

@peter-evans
Copy link
Owner

Hi @rvalitov

Sorry, I don't understand what you are trying to do. Please could you show me a workflow and explain what currently happens and what you want to happen.

@rvalitov
Copy link
Author

rvalitov commented Dec 2, 2024

Please let me know if I'm mistaken. I just made my conclusion based on the documentation in your Readme file. It says that the text I pass to your workflow is treated as markdown format and will be formatted accordingly. What I need is to avoid any formatting. Is there any option for that?

@peter-evans
Copy link
Owner

The action doesn't do any formatting. It just takes the text you pass to body and calls the GitHub API. If you want text to be rendered nicely on GitHub you can pass markdown, but it's not required.

@rvalitov
Copy link
Author

rvalitov commented Dec 2, 2024

So, if I pass **bold text** to body what the resulting comment will be? I suppose it will be a string bold text? Can you please give an advice how just to print the **bold text** message and other Markdown tags "as is", without any formatting?

@peter-evans
Copy link
Owner

So, if I pass **bold text** to body what the resulting comment will be? I suppose it will be a string bold text? Can you please give an advice how just to print the **bold text** message and other Markdown tags "as is", without any formatting?

Oh, I understand what you mean now. Just to clarify, the formatting is applied on GitHub itself because all comments are rendered as markdown. Probably the easiest way to "escape" markdown is to wrap it in a code block, exactly as you've done it your comment.

**bold text**

@rvalitov
Copy link
Author

rvalitov commented Dec 2, 2024

Thank you, I had the same idea, but that won't work in a general case, because I need to output text that is dynamically generated by other tools, so it may contain Markdown code block formatting, that may break the rendering... I was hoping there was a special option for that, or perhaps a different GitHub API endpoint URL for printing unformatted text...

@peter-evans
Copy link
Owner

I'm not aware of any special way to do that. You'll just need to find a way to escape the code blocks somehow.

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

No branches or pull requests

2 participants