-
-
Notifications
You must be signed in to change notification settings - Fork 857
Comments
{WIP} Implements highlighting#80
{WIP} Implements highlighting #80trek merged 2 commits intoemberjs:master from danmcclain:highlighted-code-fences
Conversation
At the end of the filename or language add `{1,2,-4,+5}`,
`+` signifies that the line should be marked as added
`-` signifies that the line should be marked as removed
line numbers are otherwise highlighted
Does not currently handle ranges
Also updates colors in code blocks, fixing contrast
trek
commented
Mar 24, 2015
I'm 👎 on re-parsing the HTML with Nokogiri after generation. A quick check shows CodeRay already has a way to highlight lines
I'm OK to merge this if you can commit to investigating a better way to handle this sometime this week:
Possible solutions are one or more of:
- see if CodeRay highlighting already supports what we need (highlights of many types).
- fork CodeRay and add this, open a PR on CodeRay referencing this issue, open a PR here pointing at your fork.
- figuring out how to write and use a custom encoder for CodeRay.
danmcclain
commented
Mar 24, 2015
@trek Makes sense. Let me investigate a little bit later today.
One thing to note: this repo already is using a Coderay fork: https://github.com/emberjs/guides/blob/master/Gemfile#L7
danmcclain
commented
Mar 24, 2015
Will likely implement this as a custom encoder, using the HTML encoder as a base. Will report later how that is going
trek
commented
Mar 24, 2015
One thing to note: this repo already is using a Coderay fork:
Can you also follow up on that? I'm assuming this is just because we needed to add a language to mainline CodeRay and never changed back.
danmcclain
commented
Mar 24, 2015
@trek Coderay lacks handlebars (@dgeb's PR) support. If I use mainline:
ember js - templates the application template 2015年03月24日 11-18-31
trek
commented
Mar 24, 2015
cc @dgeb: we really need to get that back to mainline.
trek
commented
Mar 27, 2015
Will report later how that is going
Is this later enough? :D
danmcclain
commented
Mar 27, 2015
@trek Been sidetracked with an Ember-IE8 breakage. I should have some time this weekend to wrap this up. I have started a custom encoder, should be fine to implement what I need to make this happen. Sorry about the delay
trek
commented
Mar 27, 2015
OK. going to merge this now, trust that you'll circle back with a smoother solution.
trek
commented
Mar 27, 2015
Actually, belay that. Let's just wait until it's all done.
WIP DO NOT MERGE
At the end of the filename or language add
{1,2,-4,+5},+signifies that the line should be marked as added-signifies that the line should be marked as removedline numbers are otherwise highlighted
Does not currently handle ranges
Also updates colors in code blocks, fixing contrast
Closes #77