Shimada666 / v-code-diff

A vue code diff display plugin, support Vue2 / Vue3
https://shimada666.github.io/v-code-diff/
MIT License
407 stars 67 forks source link

当差异行的下一行多一个空行时,对比失败 #153

Open jedi201321 opened 2 months ago

jedi201321 commented 2 months ago

image

大佬,你好,红框中的行,没有高亮显示差异word

jedi201321 commented 2 months ago

另外想问下,vue2.6支持v-code-diff的最大版本是多少,好像直接安装最新的会报错

Shimada666 commented 2 months ago

你好,2.6的情况我看下,理论上一直是兼容的

Shimada666 commented 2 months ago

实测最新版(1.13.1)可以兼容 vue2.6

a050eeafc21b55a239321f653c04a20e

jedi201321 commented 2 months ago

好的,非常感谢。我的第一个问题,有思路么

Shimada666 commented 2 months ago

好的,非常感谢。我的第一个问题,有思路么

可以把文本贴给我看下么

jedi201321 commented 2 months ago
server {
        listen 443 ssl;
        listen  80;
        server_name     logan-gateway.dev.local;
        access_log  /data/nginxlogs/log-gat.access.log log_access;
        error_log   /data/nginxlogs/log-gateway.error.log debug;

        ssl_certificate /etc/nginx/ssl/nginx-selfsigned.crt;
        ssl_certificate_key /etc/nginx/ssl/nginx-selfsigned.key;
        ssl_session_timeout 5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
server {
        listen 443 ssl;
        listen  80;
        server_name     logan-gateway.test.com;
        access_log  /data/nginxlogs/log-gateway.test.com.access.log log_access;
        error_log   /data/nginxlogs/log-gateway.test.com.error.log debug;

        ssl_certificate /etc/nginx/ssl/test.com.pem;
        ssl_certificate_key /etc/nginx/ssl/test.com.key;

        ssl_session_timeout 5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

您好,这是文本

Shimada666 commented 2 months ago

@jedi201321 您好,默认是参考 github 的设计,当一块代码块新增和删除行数不等时,只显示行级差异。如果希望强行比较,可以把 forceInlineComparison prop 设为 true

jedi201321 commented 2 months ago

@Shimada666 好的,明白了 感谢感谢