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

Swap out Albino for Pygments #50

Open
Bodacious opened this issue Nov 18, 2013 · 3 comments
Open

Swap out Albino for Pygments #50

Bodacious opened this issue Nov 18, 2013 · 3 comments

Comments

@Bodacious
Copy link
Owner

See the comments on this pull request

@natchiketa
Copy link

I was just submitting a PR when I noticed that this issue already existed :)

I did this because Albino won't work on Heroku due to the python package dependency. It's working nicely with it now for me so far.

The only hacky thing is that this gem wants the lexer extension to be passed as a symbol, so I cast it. Since both gems are using the Pygments lexers, I would imagine they always have the same names, so it theoretically should not change anything for anyone.

I did notice some additional parsing with this gem. For example, the bash keywords (e.g. cd, source) seem to have special styling now, whereas before they did not.

@Bodacious
Copy link
Owner Author

@natchiketa Thanks!

I think a more flexible solution would be to create a new class for each syntax highlighting solution.

Have a look at the Markdown parser

If we can add a new class for the Albino renderer in renderers, then we can the option to swap in one for the other via a configuration.

Thoughts?

@natchiketa
Copy link

I absolutely agree with that approach. I'll try to submit a PR doing it that way this week. I was going to hold off until I could submit it doing it that way, but when I saw this issue (i.e. that you wanted to just swap them out) I thought I'd go ahead and do one the way I have it currently.

But yeah, even if it was just one, I would still agree it should be structured the way you're suggesting.

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