Skip to content

Conversation

@SRWieZ
Copy link
Contributor

@SRWieZ SRWieZ commented Sep 27, 2025

Diff annotations

Implements inline diff annotations using comment-based syntax with full range support:

  • [code! insert], [code! add], [code! ++] for additions
  • [code! remove], [code! del], [code! delete], [code! --] for deletions
  • Gutter diff symbols: + for insert lines, - for remove lines

Fixes #117

CSS variables

I didn't find where CSS variables were added for https://phiki.dev/multi-themes and https://phiki.dev/commonmark#sample-css-2

So I added a function to do the following:

  • Automatic theme color extraction from markup.inserted/markup.deleted
  • CSS variables: --phiki-diff-insert-bg/fg, --phiki-diff-remove-bg/fg
  • Multi-theme support with prefixed variables (--phiki-light/dark-*)

Screenshots

Capture d’écran 2025-09-27 à 10 51 14 Capture d’écran 2025-09-27 à 10 49 00

@ryangjchandler
Copy link
Collaborator

Dude, this is awesome! I'll get around to reviewing this very soon, a little busy with Laravel Forge right now.

Regardless, thank you. Excited to check this out.

@ryangjchandler
Copy link
Collaborator

I haven't forgotten about this @SRWieZ – on my list of things to look at!

@SRWieZ
Copy link
Contributor Author

SRWieZ commented Nov 5, 2025

Don't worry, take your time!

I have two other PRs in mind after this one, but there are probably things to improve here. I would prefer to have your review and fixes on this one before starting on the other two 🙂

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add inline diff annotations

2 participants