Movatterモバイル変換


[0]ホーム

URL:


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

[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
wouterj wants to merge2 commits intosymfony:2.7fromwouterj:diff-lexer

Conversation

@wouterj
Copy link
Member

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 wenot use thediff type and instead add a new lexer toevery 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

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

@weaverryan
Copy link
Member

weaverryan commentedNov 18, 2017
edited
Loading

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 existingdiff 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
MemberAuthor

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 reacted with thumbs up emoji

@wouterjwouterj deleted the diff-lexer branchMarch 8, 2019 14:43
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@wouterj@weaverryan@xabbuh@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp