-
-
Notifications
You must be signed in to change notification settings - Fork 560
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
FEAT: Add custom symbol style and custom code block language #491
base: master
Are you sure you want to change the base?
Conversation
for requirements.txt
Customize code block language and handle symbol style
Great addition. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@caupolicanre could you undo the formatting changes? Especially the one to action.yml
@aravindvnair99 I don't know why it shows a complete change on the whole file, I didn't change the formatting of it. I don't know if there is a way to go back to a previous version of the file in github (before the fork) and try adding again those lines. If there is a way to do that, let me know and I'll change it. EDIT: Just used these commands to restore original git fetch upstream
git checkout upstream/master -- [action.yml] Then added the 2 new environment variables in this commit. |
I reestablished in git the original action file
@anmol098 @aravindvnair99 PR is ready to review. I remain attentive for any questions or changes needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd reeeaally like this change. Code looks good to me, I tested it on my machine.
Formatting changed were rolled back but still seem to occur, I'm also not sure why this happens, but it's working fine. I think this change can be dismissed.
Thank you so much for reviewing my PR! I would also love this change in the main project, but as of today, I'm using my own fork to have this enhanced version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great addition, thank you!
However, we can't merge without all the required workflows run successfully (or until @anmol098 relaxes this limitation 🌚)...
Hi! Yesterday, I was implementing this action on my personal README and instantly thought about 2 cool features that I'd like in this action. So first I made an issue requesting a new symbol to be added #489, but then forked the repo and started programming them by myself.
This PR has 2 new features:
Custom Symbol Style
Created a new environment variable
SYMBOL_STYLE
where the flag can be set to "▰▱" (just an example) to change the style of progress bar (by default is empty). If the length of the string is not 2, the default symbol version will be used.Then changed the logic to:
So if there are 2 symbols in "SYMBOL_STYLE" it will use them, if not, will use "SYMBOL_VERSION".
Custom Code Block Language
Created a new environment variable
CODE_BLOCK_LANGUAGE
where the flag can be set to "python" (just an example) to change the language of code blocks (by default is "text"). Here is a list of the language code blocks supported by github. I preferred to simply add the link to the list of languages to the README, and not write it, so that it is not so long.A verification can be added if you want. It could be an if statement to check if "CODE_BLOCK_LANGUAGE" is in the available languages list.
Example
Everything was tested in my personal repository.
Here is an example of my personal README where I'm using a custom symbol and python language for the code block:
I added the new documentation to the README explaining the two new environment variables.
I remain attentive for any questions.
Caupo.