rtfpessoa / diff2html

Pretty diff to html javascript library (diff2html)
https://diff2html.xyz
MIT License
2.9k stars 280 forks source link

Viewed button issue + highlight dark theme #460

Closed tnhu closed 1 year ago

tnhu commented 1 year ago

Step -1: Before filling an issue check out troubleshooting section

Step 0: Describe your environment

Step 1: Describe the problem:

Screen Shot 2022-12-07 at 11 46 59 PM

Steps to reproduce:

  1. Look at example here https://codesandbox.io/s/diff2html-issues-dkur77?file=/src/App.js

Observed Results:

Expected Results:

Relevant Code:

Look at https://codesandbox.io/s/diff2html-issues-dkur77?file=/src/App.js to reproduce.

tnhu commented 1 year ago

It looks like I made a mistake when importing css:

import "diff2html/bundles/css/diff2html.min.css";
import "highlight.js/styles/dark.css";

Change it to

import "highlight.js/styles/dark.css";
import "diff2html/bundles/css/diff2html.min.css";

Then the theme weird rendering issue goes away, but dark theme is not rendered correctly (it renders kind of light colors only).

Screen Shot 2022-12-07 at 11 47 49 PM
rtfpessoa commented 1 year ago

Strange, regarding the view button, everything seems to be working in the demo

I can try to double check with a local version when I am back in the laptop.

rtfpessoa commented 1 year ago

Cannot replicate, if you still face the issue please provide a single HTML file where it can be replicated.