diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 7f42db3..af30b11 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,5 +1,5 @@ name: Feature request / 功能建議 -description: Suggest an idea for Diff. 提出新功能或改善建議。 +description: Suggest an idea for Text Diff. 提出新功能或改善建議。 labels: [enhancement] body: - type: textarea diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 83b720b..fc02c40 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,11 +4,11 @@ ## English -Thank you for helping improve Diff! Bug reports, ideas, translations, and pull requests are all welcome. +Thank you for helping improve Text Diff! Bug reports, ideas, translations, and pull requests are all welcome. ### Reporting issues -- Use the issue templates for [bug reports](https://github.com/KageRyo/diff/issues/new?template=bug_report.yml) and [feature requests](https://github.com/KageRyo/diff/issues/new?template=feature_request.yml). +- Use the issue templates for [bug reports](https://github.com/KageRyo/text-diff/issues/new?template=bug_report.yml) and [feature requests](https://github.com/KageRyo/text-diff/issues/new?template=feature_request.yml). - For counting or diff problems, include a minimal sample text, the options you enabled, and the result you expected. - Do not paste private or sensitive text. @@ -52,11 +52,11 @@ feat(diff): add a word-level highlight option ## 正體中文 -感謝你協助改善 Diff!歡迎回報問題、提出想法、協助翻譯或送出 pull request。 +感謝你協助改善 Text Diff!歡迎回報問題、提出想法、協助翻譯或送出 pull request。 ### 回報問題 -- 請使用 [Bug 回報](https://github.com/KageRyo/diff/issues/new?template=bug_report.yml) 與 [功能建議](https://github.com/KageRyo/diff/issues/new?template=feature_request.yml) 範本。 +- 請使用 [Bug 回報](https://github.com/KageRyo/text-diff/issues/new?template=bug_report.yml) 與 [功能建議](https://github.com/KageRyo/text-diff/issues/new?template=feature_request.yml) 範本。 - 統計或比對結果有誤時,請附上最小的範例文字、勾選的選項,以及你預期的結果。 - 請勿貼上私人或敏感內容。 diff --git a/README.md b/README.md index a5e11cc..5225329 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,20 @@ -# Diff +# Text Diff -[正體中文](README_TW.md) · [Demo](https://kageryo.github.io/diff/) +[正體中文](README_TW.md) · [Demo](https://kageryo.github.io/text-diff/) Compare two texts side by side with git-style highlighting, and count words, characters, Chinese characters, English words, digits, symbols, and whitespace as you type. Everything runs in your browser: your text is never uploaded or stored. -[](https://github.com/KageRyo/diff/releases) +[](https://github.com/KageRyo/text-diff/releases) [](LICENSE) [](https://tocas-ui.com/) [](https://github.com/kpdecker/jsdiff) [](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Modules) -[](https://github.com/KageRyo/diff/actions/workflows/pages.yml) +[](https://github.com/KageRyo/text-diff/actions/workflows/pages.yml) [](CONTRIBUTING.md) -[](https://github.com/KageRyo/diff/stargazers) -[](https://github.com/KageRyo/diff/commits) +[](https://github.com/KageRyo/text-diff/stargazers) +[](https://github.com/KageRyo/text-diff/commits) -[](https://kageryo.github.io/diff/) +[](https://kageryo.github.io/text-diff/) ## At a glance @@ -52,20 +52,20 @@ Text is split into user-perceived characters (grapheme clusters), so an emoji se ## Usage -1. Open the [demo](https://kageryo.github.io/diff/). +1. Open the [demo](https://kageryo.github.io/text-diff/). 2. Paste the original text on the left and the modified text on the right. 3. Read the differences below the editors, and switch between **Split** and **Unified** views. 4. Adjust the statistics and diff options; your choices are remembered on this device. -The diff compares lines first, then highlights the characters that changed within each modified line. Lines that are too different are highlighted as a whole, and so are the remaining lines once highlighting a very large change has taken half a second. If the texts are so different that the comparison takes longer than 2 seconds, Diff shows the whole text as replaced. +The diff compares lines first, then highlights the characters that changed within each modified line. Lines that are too different are highlighted as a whole, and so are the remaining lines once highlighting a very large change has taken half a second. If the texts are so different that the comparison takes longer than 2 seconds, Text Diff shows the whole text as replaced. ## Development You need Node.js 22 or newer. There is no build step: the page loads Tocas UI from cdnjs, and an import map in `index.html` loads jsdiff from `node_modules`, so install the dependencies before you serve the page. ```bash -git clone https://github.com/KageRyo/diff.git -cd diff +git clone https://github.com/KageRyo/text-diff.git +cd text-diff npm install npm start ``` @@ -96,7 +96,7 @@ The browser and the unit tests use the same jsdiff files from `node_modules`, so The [Pages workflow](.github/workflows/pages.yml) runs the unit and browser tests on every push and pull request, and deploys the static files to GitHub Pages from `main`. To deploy a fork, open **Settings → Pages**, select **GitHub Actions** as the source, and push to `main`. -Diff is a static site, so you can also host it on any static web server. After `npm install`, publish `index.html`, `favicon.svg`, `css/`, `js/`, and `node_modules/diff/libesm/` together with `node_modules/diff/LICENSE`. +Text Diff is a static site, so you can also host it on any static web server. After `npm install`, publish `index.html`, `favicon.svg`, `css/`, `js/`, and `node_modules/diff/libesm/` together with `node_modules/diff/LICENSE`. ## Contributing diff --git a/README_TW.md b/README_TW.md index d43743c..892c431 100644 --- a/README_TW.md +++ b/README_TW.md @@ -1,20 +1,20 @@ -# Diff 文字比對與字數統計 +# Text Diff 文字比對與字數統計 -[English](README.md) · [Demo](https://kageryo.github.io/diff/) +[English](README.md) · [Demo](https://kageryo.github.io/text-diff/) 左右貼上兩段文字,即時以 git 風格標示差異,同時統計字數、字元數、中文字、英文單字、數字、符號與空白。所有處理都在瀏覽器中完成,文字不會上傳或保存。 -[](https://github.com/KageRyo/diff/releases) +[](https://github.com/KageRyo/text-diff/releases) [](LICENSE) [](https://tocas-ui.com/) [](https://github.com/kpdecker/jsdiff) [](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Modules) -[](https://github.com/KageRyo/diff/actions/workflows/pages.yml) +[](https://github.com/KageRyo/text-diff/actions/workflows/pages.yml) [](CONTRIBUTING.md) -[](https://github.com/KageRyo/diff/stargazers) -[](https://github.com/KageRyo/diff/commits) +[](https://github.com/KageRyo/text-diff/stargazers) +[](https://github.com/KageRyo/text-diff/commits) -[](https://kageryo.github.io/diff/) +[](https://kageryo.github.io/text-diff/) ## 功能概覽 @@ -52,7 +52,7 @@ ## 使用方式 -1. 開啟 [Demo](https://kageryo.github.io/diff/)。 +1. 開啟 [Demo](https://kageryo.github.io/text-diff/)。 2. 左側貼上原始文字、右側貼上修改後的文字。 3. 在下方查看差異,並可切換「並排」或「合併」。 4. 依需求調整統計與比對選項,設定會保存在這台裝置上。 @@ -64,8 +64,8 @@ 需要 Node.js 22 以上。本專案不需要 build:頁面從 cdnjs 載入 Tocas UI,並透過 `index.html` 的 import map 從 `node_modules` 載入 jsdiff,因此請先安裝依賴再啟動。 ```bash -git clone https://github.com/KageRyo/diff.git -cd diff +git clone https://github.com/KageRyo/text-diff.git +cd text-diff npm install npm start ``` @@ -96,7 +96,7 @@ npm run screenshot # 重新產生 docs/images/screenshot.png [Pages workflow](.github/workflows/pages.yml) 會在每次 push 與 pull request 執行單元與瀏覽器測試,並從 `main` 部署靜態檔案到 GitHub Pages。若要部署自己的 fork,請到 **Settings → Pages** 將來源設為 **GitHub Actions**,再 push 到 `main`。 -Diff 是靜態網站,也可以放到任何靜態網頁伺服器:執行 `npm install` 後,發布 `index.html`、`favicon.svg`、`css/`、`js/`,以及 `node_modules/diff/libesm/` 與 `node_modules/diff/LICENSE`。 +Text Diff 是靜態網站,也可以放到任何靜態網頁伺服器:執行 `npm install` 後,發布 `index.html`、`favicon.svg`、`css/`、`js/`,以及 `node_modules/diff/libesm/` 與 `node_modules/diff/LICENSE`。 ## 參與貢獻 diff --git a/index.html b/index.html index 3b3e6ce..cd8bd28 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@
-