Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 26, 2019. It is now read-only.

Comments

{WIP} Implements highlighting#80

Merged
trek merged 2 commits intoemberjs:master from
danmcclain:highlighted-code-fences
Mar 27, 2015
Merged

{WIP} Implements highlighting #80
trek merged 2 commits intoemberjs:master from
danmcclain:highlighted-code-fences

Conversation

@danmcclain
Copy link
Contributor

@danmcclain danmcclain commented Mar 23, 2015

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
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.

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

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

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.

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

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

trek commented Mar 27, 2015

Will report later how that is going

Is this later enough? :D

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

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
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.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Update Code Blocks to include additions, removals, and highlights

2 participants

AltStyle によって変換されたページ (->オリジナル) /