You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To allow users to override the default file extensions that are recognised as markdown by Glow.
Requested in #732
Issue
The list of extensions is currently hardcoded in two places (utils.go and ui.go) and there is no way for a user to override or add to this list.
Proposed Solution
Two changes are proposed:
Add a new markdownExtensions list field to the config file that overrides the defaults.
These two lines would be added to config.yml when it is first created.
For existing users, config.yml is not modified. They can manually add it later to override the defaults.
Add a flag, -f / --force to force markdown processing. This would be used for quick or one off display of markdown files with unconventional extension without having to change the config.
Eg:
glow -f input.txt
Note
The above two changes should not break compatibility.
My fork includes a commit with the changes needed
I'm happy to create a PR if maintainers like the idea.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Goal
To allow users to override the default file extensions that are recognised as markdown by Glow.
Requested in #732
Issue
The list of extensions is currently hardcoded in two places (utils.go and ui.go) and there is no way for a user to override or add to this list.
Proposed Solution
Two changes are proposed:
markdownExtensions
list field to the config file that overrides the defaults.These two lines would be added to
config.yml
when it is first created.For existing users,
config.yml
is not modified. They can manually add it later to override the defaults.-f / --force
to force markdown processing. This would be used for quick or one off display of markdown files with unconventional extension without having to change the config.Eg:
Note
The above two changes should not break compatibility.
My fork includes a commit with the changes needed
I'm happy to create a PR if maintainers like the idea.
Beta Was this translation helpful? Give feedback.
All reactions