Skip to content
This repository was archived by the owner on May 26, 2019. It is now read-only.

Conversation

@danmcclain
Copy link
Contributor

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 removed
line numbers are otherwise highlighted

Does not currently handle ranges

Also updates colors in code blocks, fixing contrast

Closes #77

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
Copy link
Member

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
Copy link
Contributor Author

@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
Copy link
Contributor Author

Will likely implement this as a custom encoder, using the HTML encoder as a base. Will report later how that is going

@trek
Copy link
Member

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
Copy link
Contributor Author

@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
Copy link
Member

trek commented Mar 24, 2015

cc @dgeb: we really need to get that back to mainline.

@danmcclain danmcclain changed the title Implements highlighting {WIP} Implements highlighting Mar 24, 2015
@trek
Copy link
Member

trek commented Mar 27, 2015

Will report later how that is going

Is this later enough? :D

@danmcclain
Copy link
Contributor Author

@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
Copy link
Member

trek commented Mar 27, 2015

OK. going to merge this now, trust that you'll circle back with a smoother solution.

trek added a commit that referenced this pull request Mar 27, 2015
@trek trek merged commit f614688 into emberjs:master Mar 27, 2015
@trek
Copy link
Member

trek commented Mar 27, 2015

Actually, belay that. Let's just wait until it's all done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Code Blocks to include additions, removals, and highlights

2 participants