I have a long string that I want to embed in my blog using Github Gist. I want to enable line-wrap for it, so that readers don't have to scroll right to view the entire string. Even after clicking the 'soft-wrap' option while editing, the final gist is not wrapped.
While editing (Soft-wrap enabled):
After saving (No line-wrap):
Github doesn't soft wrap any of the code files, including txt files. Wrapping is only applied to prose documents, such as markdown and rst documents.
The solution to your problem would be to rename gist from sample_text.py
to sample_text.md
and apply Soft wrap
. That would produce desired effect you want to achieve.
Read this conversation on Github community for more context.