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

Appearance settings

[POC][DO NOT MERGE] Added improved diff lexer #7806

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

Closed
wants to merge 2 commits into from

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Apr 15, 2017

Just to play with something discussed this afternoon: Allowing to show diff, but making +/- not copyable.

View the page on platform.sh:

And make sure you inject the following CSS when viewing:

.gi:before { content:'+ '; }
.gd:before { content:'- '; }
.gi, .gd   { background:none !important; }
.g-DiffIndicator { display:none; }

/cc @weaverryan

@weaverryan
Copy link
Member

@wouterj This is a DoNotMerge... but I want us to merge it :). I know this was a quick experiment - what's missing?

Thanks!

@weaverryan
Copy link
Member

Ping @wouterj!

I had another idea since I can see how powerful this is... Could we not use the diff type and instead add a new lexer to every type that:

A) Does what your lexer does now - looks for a + or - at the start of a line and make it no copiable
B) Look for a + or - at the start of a line and add a wrapper class around that line (e.g. diff-addition) which we can use for styling.

Wouldn't that allow us to have non-copiable diffs AND highlighting?

@xabbuh
Copy link
Member

xabbuh commented May 12, 2017

The code block added in #7868 is a good example for this diff and could be adapted accordingly here.

@weaverryan
Copy link
Member

weaverryan commented Nov 18, 2017

Hey @bellisk! You should totally check this out ;)

@javiereguiluz
Copy link
Member

@wouterj just asking: what's the plan for this PR? Are we going to finish it to replace the existing diff thing? Thanks!

@javiereguiluz
Copy link
Member

I'm closing this PR as "won't merge" ... because we're working on a new doc builder which will be completely incompatible with this. But the idea is very nice ... so we'll implement it in the new builder. Thanks.

@wouterj
Copy link
Member Author

wouterj commented Mar 7, 2019

What syntax highlighter is used in the new builder?

@javiereguiluz
Copy link
Member

I've replied to you via Slack with some more details about the upcoming doc builder. Thanks.

@wouterj wouterj deleted the diff-lexer branch March 8, 2019 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.