diff --git a/README.md b/README.md index 5a026ea..5119b55 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ [![Go Version](https://img.shields.io/badge/Go-1.19+-00ADD8?style=flat&logo=go)](https://golang.org) [![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) [![Tests](https://img.shields.io/badge/Tests-Passing-green.svg)](#testing) -[![Benchmark](https://img.shields.io/badge/Benchmark-Go%202.62ms%20%7C%20JS%209.63ms%20%7C%20Python%2055.98ms-success.svg)](https://github.com/zerx-lab/wordZero/wiki/en-Performance-Benchmarks) -[![Performance](https://img.shields.io/badge/Performance-Golang%20Winner-brightgreen.svg)](https://github.com/zerx-lab/wordZero/wiki/en-Performance-Benchmarks) +[![Benchmark](https://img.shields.io/badge/Benchmark-Go%202.62ms%20%7C%20JS%209.63ms%20%7C%20Python%2055.98ms-success.svg)](https://github.com/hiyali/wordZero/wiki/en-Performance-Benchmarks) +[![Performance](https://img.shields.io/badge/Performance-Golang%20Winner-brightgreen.svg)](https://github.com/hiyali/wordZero/wiki/en-Performance-Benchmarks) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/zerx-lab/wordZero) @@ -53,7 +53,7 @@ If you need to work with Excel documents, we highly recommend [**Excelize**](htt ```go // WordZero + Excelize combination example import ( - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" "github.com/qax-os/excelize/v2" ) @@ -70,7 +70,7 @@ xlsx.SetCellValue("Sheet1", "B1", "Value") ## Installation ```bash -go get github.com/zerx-lab/wordZero +go get github.com/hiyali/wordZero ``` ### Version Notes @@ -79,10 +79,10 @@ We recommend using versioned installation: ```bash # Install latest version -go get github.com/zerx-lab/wordZero@latest +go get github.com/hiyali/wordZero@latest # Install specific version -go get github.com/zerx-lab/wordZero@v1.6.0 +go get github.com/hiyali/wordZero@v1.6.0 ``` ## Quick Start @@ -92,8 +92,8 @@ package main import ( "log" - "github.com/zerx-lab/wordZero/pkg/document" - "github.com/zerx-lab/wordZero/pkg/style" + "github.com/hiyali/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/style" ) func main() { @@ -177,7 +177,7 @@ package main import ( "log" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { @@ -250,7 +250,7 @@ package main import ( "log" - "github.com/zerx-lab/wordZero/pkg/markdown" + "github.com/hiyali/wordZero/pkg/markdown" ) func main() { @@ -319,7 +319,7 @@ package main import ( "log" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { @@ -355,14 +355,14 @@ func main() { ### 📚 Complete Documentation **Available in multiple languages**: -- **English**: [📖 Wiki Documentation](https://github.com/zerx-lab/wordZero/wiki/en-Home) -- **中文**: [📖 中文文档](https://github.com/zerx-lab/wordZero/wiki) +- **English**: [📖 Wiki Documentation](https://github.com/hiyali/wordZero/wiki/en-Home) +- **中文**: [📖 中文文档](https://github.com/hiyali/wordZero/wiki) **Key Documentation**: -- [**🚀 Quick Start**](https://github.com/zerx-lab/wordZero/wiki/en-Quick-Start) - Beginner's guide -- [**⚡ Feature Overview**](https://github.com/zerx-lab/wordZero/wiki/en-Feature-Overview) - Detailed description of all features -- [**📊 Performance Benchmarks**](https://github.com/zerx-lab/wordZero/wiki/en-Performance-Benchmarks) - Cross-language performance comparison analysis -- [**🏗️ Project Structure**](https://github.com/zerx-lab/wordZero/wiki/en-Project-Structure) - Project architecture and code organization +- [**🚀 Quick Start**](https://github.com/hiyali/wordZero/wiki/en-Quick-Start) - Beginner's guide +- [**⚡ Feature Overview**](https://github.com/hiyali/wordZero/wiki/en-Feature-Overview) - Detailed description of all features +- [**📊 Performance Benchmarks**](https://github.com/hiyali/wordZero/wiki/en-Performance-Benchmarks) - Cross-language performance comparison analysis +- [**🏗️ Project Structure**](https://github.com/hiyali/wordZero/wiki/en-Project-Structure) - Project architecture and code organization ### 💡 Usage Examples See example code in the `examples/` directory: @@ -422,7 +422,7 @@ go run ./examples/markdown_conversion/ - Graphics drawing functionality - Multi-language and internationalization support -👉 **View complete feature list**: [Feature Overview](https://github.com/zerx-lab/wordZero/wiki/en-Feature-Overview) +👉 **View complete feature list**: [Feature Overview](https://github.com/hiyali/wordZero/wiki/en-Feature-Overview) ## Performance @@ -434,7 +434,7 @@ WordZero excels in performance, verified through comprehensive benchmarks: | JavaScript | 9.63ms | 3.67× | | Python | 55.98ms | 21.37× | -👉 **View detailed performance analysis**: [Performance Benchmarks](https://github.com/zerx-lab/wordZero/wiki/en-Performance-Benchmarks) +👉 **View detailed performance analysis**: [Performance Benchmarks](https://github.com/hiyali/wordZero/wiki/en-Performance-Benchmarks) ## Project Structure @@ -453,7 +453,7 @@ wordZero/ └── wordZero.wiki/ # Complete documentation ``` -👉 **View detailed structure description**: [Project Structure](https://github.com/zerx-lab/wordZero/wiki/en-Project-Structure) +👉 **View detailed structure description**: [Project Structure](https://github.com/hiyali/wordZero/wiki/en-Project-Structure) ### Logo and Branding @@ -485,7 +485,7 @@ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file --- **More Resources**: -- 📖 [Complete Documentation](https://github.com/zerx-lab/wordZero/wiki) -- 🔧 [API Reference](https://github.com/zerx-lab/wordZero/wiki/en-API-Reference) -- 💡 [Best Practices](https://github.com/zerx-lab/wordZero/wiki/en-Best-Practices) +- 📖 [Complete Documentation](https://github.com/hiyali/wordZero/wiki) +- 🔧 [API Reference](https://github.com/hiyali/wordZero/wiki/en-API-Reference) +- 💡 [Best Practices](https://github.com/hiyali/wordZero/wiki/en-Best-Practices) - 📝 [Changelog](CHANGELOG.md) \ No newline at end of file diff --git a/README_zh.md b/README_zh.md index d44bb3f..dac56c6 100644 --- a/README_zh.md +++ b/README_zh.md @@ -9,8 +9,8 @@ [![Go Version](https://img.shields.io/badge/Go-1.19+-00ADD8?style=flat&logo=go)](https://golang.org) [![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) [![Tests](https://img.shields.io/badge/Tests-Passing-green.svg)](#测试) -[![Benchmark](https://img.shields.io/badge/Benchmark-Go%202.62ms%20%7C%20JS%209.63ms%20%7C%20Python%2055.98ms-success.svg)](https://github.com/zerx-lab/wordZero/wiki/13-%E6%80%A7%E8%83%BD%E5%9F%BA%E5%87%86%E6%B5%8B%E8%AF%95) -[![Performance](https://img.shields.io/badge/Performance-Golang%20优胜-brightgreen.svg)](https://github.com/zerx-lab/wordZero/wiki/13-%E6%80%A7%E8%83%BD%E5%9F%BA%E5%87%86%E6%B5%8B%E8%AF%95) +[![Benchmark](https://img.shields.io/badge/Benchmark-Go%202.62ms%20%7C%20JS%209.63ms%20%7C%20Python%2055.98ms-success.svg)](https://github.com/hiyali/wordZero/wiki/13-%E6%80%A7%E8%83%BD%E5%9F%BA%E5%87%86%E6%B5%8B%E8%AF%95) +[![Performance](https://img.shields.io/badge/Performance-Golang%20优胜-brightgreen.svg)](https://github.com/hiyali/wordZero/wiki/13-%E6%80%A7%E8%83%BD%E5%9F%BA%E5%87%86%E6%B5%8B%E8%AF%95) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/zerx-lab/wordZero) @@ -53,7 +53,7 @@ WordZero 是一个使用 Golang 实现的 Word 文档操作库,提供基础的 ```go // WordZero + Excelize 组合示例 import ( - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" "github.com/xuri/excelize/v2" ) @@ -70,7 +70,7 @@ xlsx.SetCellValue("Sheet1", "B1", "数值") ## 安装 ```bash -go get github.com/zerx-lab/wordZero +go get github.com/hiyali/wordZero ``` ### 版本说明 @@ -79,10 +79,10 @@ go get github.com/zerx-lab/wordZero ```bash # 安装最新版本 -go get github.com/zerx-lab/wordZero@latest +go get github.com/hiyali/wordZero@latest # 安装指定版本 -go get github.com/zerx-lab/wordZero@v1.6.0 +go get github.com/hiyali/wordZero@v1.6.0 ``` ## 快速开始 @@ -92,8 +92,8 @@ package main import ( "log" - "github.com/zerx-lab/wordZero/pkg/document" - "github.com/zerx-lab/wordZero/pkg/style" + "github.com/hiyali/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/style" ) func main() { @@ -177,7 +177,7 @@ package main import ( "log" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { @@ -250,7 +250,7 @@ package main import ( "log" - "github.com/zerx-lab/wordZero/pkg/markdown" + "github.com/hiyali/wordZero/pkg/markdown" ) func main() { @@ -319,7 +319,7 @@ package main import ( "log" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { @@ -355,14 +355,14 @@ func main() { ### 📚 完整文档 **多语言文档支持**: -- **中文**: [📖 中文文档](https://github.com/zerx-lab/wordZero/wiki) -- **English**: [📖 Wiki Documentation](https://github.com/zerx-lab/wordZero/wiki/en-Home) +- **中文**: [📖 中文文档](https://github.com/hiyali/wordZero/wiki) +- **English**: [📖 Wiki Documentation](https://github.com/hiyali/wordZero/wiki/en-Home) **核心文档**: -- [**🚀 快速开始**](https://github.com/zerx-lab/wordZero/wiki/01-快速开始) - 新手入门指南 -- [**⚡ 功能特性详览**](https://github.com/zerx-lab/wordZero/wiki/14-功能特性详览) - 所有功能的详细说明 -- [**📊 性能基准测试**](https://github.com/zerx-lab/wordZero/wiki/13-性能基准测试) - 跨语言性能对比分析 -- [**🏗️ 项目结构详解**](https://github.com/zerx-lab/wordZero/wiki/15-项目结构详解) - 项目架构和代码组织 +- [**🚀 快速开始**](https://github.com/hiyali/wordZero/wiki/01-快速开始) - 新手入门指南 +- [**⚡ 功能特性详览**](https://github.com/hiyali/wordZero/wiki/14-功能特性详览) - 所有功能的详细说明 +- [**📊 性能基准测试**](https://github.com/hiyali/wordZero/wiki/13-性能基准测试) - 跨语言性能对比分析 +- [**🏗️ 项目结构详解**](https://github.com/hiyali/wordZero/wiki/15-项目结构详解) - 项目架构和代码组织 ### 💡 使用示例 查看 `examples/` 目录下的示例代码: @@ -426,7 +426,7 @@ go run ./examples/paragraph_format_demo/ - 图形绘制功能 - 多语言和国际化支持 -👉 **查看完整功能列表**: [功能特性详览](https://github.com/zerx-lab/wordZero/wiki/14-功能特性详览) +👉 **查看完整功能列表**: [功能特性详览](https://github.com/hiyali/wordZero/wiki/14-功能特性详览) ## 性能表现 @@ -438,7 +438,7 @@ WordZero 在性能方面表现卓越,通过完整的基准测试验证: | JavaScript | 9.63ms | 3.67× | | Python | 55.98ms | 21.37× | -👉 **查看详细性能分析**: [性能基准测试](https://github.com/zerx-lab/wordZero/wiki/13-性能基准测试) +👉 **查看详细性能分析**: [性能基准测试](https://github.com/hiyali/wordZero/wiki/13-性能基准测试) ## 项目结构 @@ -457,7 +457,7 @@ wordZero/ └── wordZero.wiki/ # 完整文档 ``` -👉 **查看详细结构说明**: [项目结构详解](https://github.com/zerx-lab/wordZero/wiki/15-项目结构详解) +👉 **查看详细结构说明**: [项目结构详解](https://github.com/hiyali/wordZero/wiki/15-项目结构详解) ### Logo设计 @@ -489,7 +489,7 @@ wordZero/ --- **更多资源**: -- 📖 [完整文档](https://github.com/zerx-lab/wordZero/wiki) -- 🔧 [API参考](https://github.com/zerx-lab/wordZero/wiki/10-API参考) -- 💡 [最佳实践](https://github.com/zerx-lab/wordZero/wiki/09-最佳实践) +- 📖 [完整文档](https://github.com/hiyali/wordZero/wiki) +- 🔧 [API参考](https://github.com/hiyali/wordZero/wiki/10-API参考) +- 💡 [最佳实践](https://github.com/hiyali/wordZero/wiki/09-最佳实践) - 📝 [更新日志](CHANGELOG.md) \ No newline at end of file diff --git a/benchmark/golang/benchmark_test.go b/benchmark/golang/benchmark_test.go index 249fb7a..59ab9f8 100644 --- a/benchmark/golang/benchmark_test.go +++ b/benchmark/golang/benchmark_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" - "github.com/zerx-lab/wordZero/pkg/document" - "github.com/zerx-lab/wordZero/pkg/style" + "github.com/hiyali/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/style" ) // 统一的测试配置,与JavaScript和Python保持一致 diff --git a/benchmark/golang/go.mod b/benchmark/golang/go.mod index 14b7e1b..5181a69 100644 --- a/benchmark/golang/go.mod +++ b/benchmark/golang/go.mod @@ -4,6 +4,6 @@ go 1.22 toolchain go1.24.10 -replace github.com/zerx-lab/wordZero => ../../ +replace github.com/hiyali/wordZero => ../../ -require github.com/zerx-lab/wordZero v0.0.0-00010101000000-000000000000 +require github.com/hiyali/wordZero v0.0.0-00010101000000-000000000000 diff --git a/docs/MULTILINGUAL_GUIDE.md b/docs/MULTILINGUAL_GUIDE.md index 5829af0..4e9e5ad 100644 --- a/docs/MULTILINGUAL_GUIDE.md +++ b/docs/MULTILINGUAL_GUIDE.md @@ -183,9 +183,9 @@ title.SetStyle(style.StyleHeading1) ### Project Links -- **GitHub Repository**: https://github.com/zerx-lab/wordZero -- **Chinese Wiki**: https://github.com/zerx-lab/wordZero/wiki -- **English Wiki**: https://github.com/zerx-lab/wordZero/wiki/en-Home +- **GitHub Repository**: https://github.com/hiyali/wordZero +- **Chinese Wiki**: https://github.com/hiyali/wordZero/wiki +- **English Wiki**: https://github.com/hiyali/wordZero/wiki/en-Home ### Related Documentation diff --git a/examples/advanced_features/main.go b/examples/advanced_features/main.go index 9236694..ae9624d 100644 --- a/examples/advanced_features/main.go +++ b/examples/advanced_features/main.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/alignment_demo/alignment_demo.go b/examples/alignment_demo/alignment_demo.go index cd98a1b..b119c55 100644 --- a/examples/alignment_demo/alignment_demo.go +++ b/examples/alignment_demo/alignment_demo.go @@ -10,7 +10,7 @@ import ( "os" "path/filepath" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) // createSampleImageWithText 创建带文字的示例图片 diff --git a/examples/basic/basic_example.go b/examples/basic/basic_example.go index 54c7b7e..1ad6c39 100644 --- a/examples/basic/basic_example.go +++ b/examples/basic/basic_example.go @@ -7,8 +7,8 @@ import ( "os" "path/filepath" - "github.com/zerx-lab/wordZero/pkg/document" - "github.com/zerx-lab/wordZero/pkg/style" + "github.com/hiyali/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/style" ) func main() { @@ -53,10 +53,10 @@ func main() { codeTitle := doc.AddParagraph("代码示例") codeTitle.SetStyle(style.StyleHeading3) - codeExample := `go get github.com/zerx-lab/wordZero + codeExample := `go get github.com/hiyali/wordZero // 使用示例 -import "github.com/zerx-lab/wordZero/pkg/document" +import "github.com/hiyali/wordZero/pkg/document" doc := document.New() doc.AddParagraph("Hello, WordZero!") diff --git a/examples/cell_advanced/main.go b/examples/cell_advanced/main.go index d2aa121..f087c97 100644 --- a/examples/cell_advanced/main.go +++ b/examples/cell_advanced/main.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/cell_iterator/main.go b/examples/cell_iterator/main.go index 39738b5..52c9512 100644 --- a/examples/cell_iterator/main.go +++ b/examples/cell_iterator/main.go @@ -6,7 +6,7 @@ import ( "os" "path/filepath" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/complex_table_demo/main.go b/examples/complex_table_demo/main.go index 3928f13..3809a54 100644 --- a/examples/complex_table_demo/main.go +++ b/examples/complex_table_demo/main.go @@ -11,7 +11,7 @@ import ( "log" "os" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/enhanced_template_demo/enhanced_template_demo.go b/examples/enhanced_template_demo/enhanced_template_demo.go index 1cb6a05..8037720 100644 --- a/examples/enhanced_template_demo/enhanced_template_demo.go +++ b/examples/enhanced_template_demo/enhanced_template_demo.go @@ -7,7 +7,7 @@ import ( "os" "time" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/floating_images_demo/go.mod b/examples/floating_images_demo/go.mod index 8836fc4..bf3217d 100644 --- a/examples/floating_images_demo/go.mod +++ b/examples/floating_images_demo/go.mod @@ -2,6 +2,6 @@ module floating_images_demo go 1.24.10 -replace github.com/zerx-lab/wordZero => ../.. +replace github.com/hiyali/wordZero => ../.. -require github.com/zerx-lab/wordZero v1.4.0 +require github.com/hiyali/wordZero v1.4.0 diff --git a/examples/floating_images_demo/main.go b/examples/floating_images_demo/main.go index de37956..7880fa5 100644 --- a/examples/floating_images_demo/main.go +++ b/examples/floating_images_demo/main.go @@ -8,7 +8,7 @@ import ( "image/png" "log" -"github.com/zerx-lab/wordZero/pkg/document" +"github.com/hiyali/wordZero/pkg/document" ) // createTestImage 创建一个简单的测试图片 diff --git a/examples/formatting/formatted_text_demo.go b/examples/formatting/formatted_text_demo.go index 5766372..653f2c9 100644 --- a/examples/formatting/formatted_text_demo.go +++ b/examples/formatting/formatted_text_demo.go @@ -3,7 +3,7 @@ package main import ( "log" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/image_persistence_demo/main.go b/examples/image_persistence_demo/main.go index a69626a..612e8f1 100644 --- a/examples/image_persistence_demo/main.go +++ b/examples/image_persistence_demo/main.go @@ -10,7 +10,7 @@ import ( "log" "os" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) // createSampleImage 创建示例图片 diff --git a/examples/issue_scenario_test/main.go b/examples/issue_scenario_test/main.go index 4c7c711..0d6ef10 100644 --- a/examples/issue_scenario_test/main.go +++ b/examples/issue_scenario_test/main.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/markdown_demo/math_formula_demo.go b/examples/markdown_demo/math_formula_demo.go index aa38ec1..9948774 100644 --- a/examples/markdown_demo/math_formula_demo.go +++ b/examples/markdown_demo/math_formula_demo.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/zerx-lab/wordZero/pkg/markdown" + "github.com/hiyali/wordZero/pkg/markdown" ) // 数学公式转换示例 diff --git a/examples/markdown_demo/soft_linebreak_demo.go b/examples/markdown_demo/soft_linebreak_demo.go index aeedae0..774ef56 100644 --- a/examples/markdown_demo/soft_linebreak_demo.go +++ b/examples/markdown_demo/soft_linebreak_demo.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/zerx-lab/wordZero/pkg/markdown" + "github.com/hiyali/wordZero/pkg/markdown" ) func main() { diff --git a/examples/markdown_demo/table_and_tasklist_demo.go b/examples/markdown_demo/table_and_tasklist_demo.go index a3478f0..7fc4772 100644 --- a/examples/markdown_demo/table_and_tasklist_demo.go +++ b/examples/markdown_demo/table_and_tasklist_demo.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/zerx-lab/wordZero/pkg/markdown" + "github.com/hiyali/wordZero/pkg/markdown" ) func main() { @@ -38,7 +38,7 @@ func main() { 这是一个[外部链接](https://github.com)的示例。 -这是一个[WordZero项目链接](https://github.com/zerx-lab/wordZero)。 +这是一个[WordZero项目链接](https://github.com/hiyali/wordZero)。 ## 3. 列表功能 @@ -119,7 +119,7 @@ package main import ( "fmt" - "github.com/zerx-lab/wordZero/pkg/markdown" + "github.com/hiyali/wordZero/pkg/markdown" ) func main() { @@ -215,7 +215,7 @@ function convertMarkdown(content) { 1. **第一步:环境准备** - 安装Go语言环境(版本 >= 1.19) - - 克隆项目:` + "`git clone https://github.com/zerx-lab/wordZero.git`" + ` + - 克隆项目:` + "`git clone https://github.com/hiyali/wordZero.git`" + ` - 下载依赖:` + "`go mod download`" + ` 2. **第二步:配置设置** diff --git a/examples/nested_loop_demo/main.go b/examples/nested_loop_demo/main.go index e51fbb9..fae965b 100644 --- a/examples/nested_loop_demo/main.go +++ b/examples/nested_loop_demo/main.go @@ -6,7 +6,7 @@ import ( "log" "time" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/page_settings/main.go b/examples/page_settings/main.go index d4fa8b9..efca6a6 100644 --- a/examples/page_settings/main.go +++ b/examples/page_settings/main.go @@ -6,7 +6,7 @@ import ( "log" "path/filepath" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/pagination_deletion_demo/main.go b/examples/pagination_deletion_demo/main.go index 9ef84b7..b7971b9 100644 --- a/examples/pagination_deletion_demo/main.go +++ b/examples/pagination_deletion_demo/main.go @@ -6,7 +6,7 @@ import ( "log" "os" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/paragraph_format_demo/main.go b/examples/paragraph_format_demo/main.go index aaecef2..85578cb 100644 --- a/examples/paragraph_format_demo/main.go +++ b/examples/paragraph_format_demo/main.go @@ -3,7 +3,7 @@ package main import ( "log" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/style_demo/style_demo.go b/examples/style_demo/style_demo.go index 2a33c6f..d5203a0 100644 --- a/examples/style_demo/style_demo.go +++ b/examples/style_demo/style_demo.go @@ -5,8 +5,8 @@ import ( "fmt" "log" - "github.com/zerx-lab/wordZero/pkg/document" - "github.com/zerx-lab/wordZero/pkg/style" + "github.com/hiyali/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/style" ) func main() { diff --git a/examples/table/table_example.go b/examples/table/table_example.go index 9afe2ef..3c1b77a 100644 --- a/examples/table/table_example.go +++ b/examples/table/table_example.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/table_default_style/main.go b/examples/table_default_style/main.go index b6f99af..935f3bf 100644 --- a/examples/table_default_style/main.go +++ b/examples/table_default_style/main.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/table_layout/main.go b/examples/table_layout/main.go index cd2d267..4db2183 100644 --- a/examples/table_layout/main.go +++ b/examples/table_layout/main.go @@ -5,7 +5,7 @@ import ( "log" "path/filepath" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/table_style/main.go b/examples/table_style/main.go index 74aef14..68d1603 100644 --- a/examples/table_style/main.go +++ b/examples/table_style/main.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/template_demo/main.go b/examples/template_demo/main.go index cf9f6a7..39203b1 100644 --- a/examples/template_demo/main.go +++ b/examples/template_demo/main.go @@ -7,7 +7,7 @@ import ( "os" "time" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/template_from_file_demo/main.go b/examples/template_from_file_demo/main.go index a709ba9..b34ac67 100644 --- a/examples/template_from_file_demo/main.go +++ b/examples/template_from_file_demo/main.go @@ -7,7 +7,7 @@ import ( "os" "time" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/template_image_demo/main.go b/examples/template_image_demo/main.go index 311b4d2..22d2d9b 100644 --- a/examples/template_image_demo/main.go +++ b/examples/template_image_demo/main.go @@ -10,7 +10,7 @@ import ( "log" "os" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) // createSampleImageWithColor 创建指定颜色的示例图片数据 diff --git a/examples/template_inheritance_demo/template_inheritance_demo.go b/examples/template_inheritance_demo/template_inheritance_demo.go index 513651f..f40b2de 100644 --- a/examples/template_inheritance_demo/template_inheritance_demo.go +++ b/examples/template_inheritance_demo/template_inheritance_demo.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/toc_update_demo/main.go b/examples/toc_update_demo/main.go index 3ad05a6..6488375 100644 --- a/examples/toc_update_demo/main.go +++ b/examples/toc_update_demo/main.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/examples/word_to_markdown_demo/word_to_markdown_demo.go b/examples/word_to_markdown_demo/word_to_markdown_demo.go index 3c279f0..d8ca2aa 100644 --- a/examples/word_to_markdown_demo/word_to_markdown_demo.go +++ b/examples/word_to_markdown_demo/word_to_markdown_demo.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - "github.com/zerx-lab/wordZero/pkg/markdown" + "github.com/hiyali/wordZero/pkg/markdown" ) func main() { diff --git a/go.mod b/go.mod index 1944293..8881609 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/zerx-lab/wordZero +module github.com/hiyali/wordZero go 1.19 diff --git a/pkg/document/README.md b/pkg/document/README.md index 3c5cc55..b8ad241 100644 --- a/pkg/document/README.md +++ b/pkg/document/README.md @@ -999,7 +999,7 @@ WordZero现在支持将Markdown文档转换为Word格式,基于goldmark解析 #### 基础字符串转换 ```go -import "github.com/zerx-lab/wordZero/pkg/markdown" +import "github.com/hiyali/wordZero/pkg/markdown" // 创建转换器 converter := markdown.NewConverter(markdown.DefaultOptions()) @@ -1190,7 +1190,7 @@ WordZero现在支持将Word文档反向转换为Markdown格式,提供完整的 #### 基础文件导出 ```go -import "github.com/zerx-lab/wordZero/pkg/markdown" +import "github.com/hiyali/wordZero/pkg/markdown" // 创建导出器 exporter := markdown.NewExporter(markdown.DefaultExportOptions()) @@ -1271,7 +1271,7 @@ err := exporter.BatchExport(files, "markdown_output/", options) #### 自动转换 ```go -import "github.com/zerx-lab/wordZero/pkg/markdown" +import "github.com/hiyali/wordZero/pkg/markdown" // 创建双向转换器 converter := markdown.NewBidirectionalConverter( diff --git a/pkg/document/document.go b/pkg/document/document.go index a58011b..8b39ce9 100644 --- a/pkg/document/document.go +++ b/pkg/document/document.go @@ -12,7 +12,7 @@ import ( "strconv" "strings" - "github.com/zerx-lab/wordZero/pkg/style" + "github.com/hiyali/wordZero/pkg/style" ) // Document 表示一个Word文档 @@ -99,8 +99,10 @@ type Paragraph struct { } // ParagraphProperties 段落属性 +// +// 不含 XMLName 字段:Paragraph.Properties 的 tag 已是 w:pPr,若此处再声明 XMLName 会与 +// encoding/xml 的类型检查冲突。序列化由 MarshalXML 负责,以正确输出 w:sectPr 等子元素。 type ParagraphProperties struct { - XMLName xml.Name `xml:"w:pPr"` ParagraphStyle *ParagraphStyle `xml:"w:pStyle,omitempty"` NumberingProperties *NumberingProperties `xml:"w:numPr,omitempty"` ParagraphBorder *ParagraphBorder `xml:"w:pBdr,omitempty"` @@ -114,6 +116,79 @@ type ParagraphProperties struct { PageBreakBefore *PageBreakBefore `xml:"w:pageBreakBefore,omitempty"` // 段前分页 WidowControl *WidowControl `xml:"w:widowControl,omitempty"` // 孤行控制 OutlineLevel *OutlineLevel `xml:"w:outlineLvl,omitempty"` // 大纲级别 + // SectPr 段落内分节属性(常见于空段落后接「下一节」,与文档 body 末尾的 sectPr 不同) + SectPr *SectionProperties `xml:"w:sectPr,omitempty"` +} + +const wordMLNs = "http://schemas.openxmlformats.org/wordprocessingml/2006/main" + +// MarshalXML w:pPr 自定义序列化。 +// encoding/xml 在处理「外层为 w:pPr、子字段 SectPr 为 *SectionProperties(其自带 XMLName = w:sectPr)」 +// 时会产生名称/嵌套冲突,导致段落内 w:sectPr(如「特别提示」前的分节)在 marshal 时被丢掉。 +func (pp *ParagraphProperties) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + if pp == nil { + return nil + } + name := start.Name + if name.Local == "" { + name = xml.Name{Space: wordMLNs, Local: "pPr"} + } else if name.Space == "" { + name.Space = wordMLNs + } + tok := xml.StartElement{Name: name, Attr: start.Attr} + if err := e.EncodeToken(tok); err != nil { + return err + } + emit := func(v any) error { + if v == nil { + return nil + } + return e.Encode(v) + } + // 顺序对齐 cloneParagraphProperties 与常见 Word 导出;段落内 sectPr 通常在最后。 + if err := emit(pp.ParagraphStyle); err != nil { + return err + } + if err := emit(pp.NumberingProperties); err != nil { + return err + } + if err := emit(pp.ParagraphBorder); err != nil { + return err + } + if err := emit(pp.Tabs); err != nil { + return err + } + if err := emit(pp.SnapToGrid); err != nil { + return err + } + if err := emit(pp.Spacing); err != nil { + return err + } + if err := emit(pp.Indentation); err != nil { + return err + } + if err := emit(pp.Justification); err != nil { + return err + } + if err := emit(pp.KeepNext); err != nil { + return err + } + if err := emit(pp.KeepLines); err != nil { + return err + } + if err := emit(pp.PageBreakBefore); err != nil { + return err + } + if err := emit(pp.WidowControl); err != nil { + return err + } + if err := emit(pp.OutlineLevel); err != nil { + return err + } + if err := emit(pp.SectPr); err != nil { + return err + } + return e.EncodeToken(xml.EndElement{Name: tok.Name}) } // SnapToGrid 网格对齐设置 @@ -2218,12 +2293,12 @@ func (d *Document) parseParagraphProperties(decoder *xml.Decoder, paragraph *Par } paragraph.Properties.NumberingProperties = numPr case "sectPr": - // 一些文档将节属性存储在段落属性中 + // 段落属性内的节属性(不能与文档级 setSectionProperties 混用) sectPr, err := d.parseSectionProperties(decoder, t) if err != nil { return err } - d.setSectionProperties(sectPr) + paragraph.Properties.SectPr = sectPr default: if err := d.skipElement(decoder, t.Name.Local); err != nil { return err diff --git a/pkg/document/document_test.go b/pkg/document/document_test.go index c8e54f3..d2f87b5 100644 --- a/pkg/document/document_test.go +++ b/pkg/document/document_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/zerx-lab/wordZero/pkg/style" + "github.com/hiyali/wordZero/pkg/style" ) // assertParagraphContent 验证段落的文本内容(带边界检查) diff --git a/pkg/document/template.go b/pkg/document/template.go index a47e726..0fdbaf8 100644 --- a/pkg/document/template.go +++ b/pkg/document/template.go @@ -1102,6 +1102,11 @@ func (te *TemplateEngine) cloneParagraphProperties(source *ParagraphProperties) } } + // 复制段落内的分节节属性(特别提示:上方的 w:sectPr 等) + if source.SectPr != nil { + props.SectPr = te.cloneSectionProperties(source.SectPr) + } + return props } @@ -1112,6 +1117,12 @@ func (te *TemplateEngine) cloneRun(source *Run) Run { Text: Text{Content: source.Text.Content, Space: source.Text.Space}, } + // 分页/换行(与 postprocess_pagebreak、Word 原版 Command+Enter 一致) + if source.Break != nil { + br := *source.Break + newRun.Break = &br + } + // 复制图像(如果有) if source.Drawing != nil { // 暂时保持简单复制,图像的深度复制比较复杂 @@ -2742,29 +2753,38 @@ func (te *TemplateEngine) renderImages(content string, images map[string]*Templa } // processImagePlaceholders 处理文档中的图片占位符 +// 注意:不能在 range 遍历 doc.Body.Elements 的同时原地修改该切片, +// 否则会导致后续元素索引错位,出现“第一张图片正常、第二张仍是占位符文本”的问题。 +// 这里采用安全做法:遍历时把结果收集到 newElements,最后一次性赋回。 func (te *TemplateEngine) processImagePlaceholders(doc *Document, data *TemplateData) error { - // 遍历文档元素,查找并替换图片占位符 - for i, element := range doc.Body.Elements { + elements := doc.Body.Elements + newElements := make([]interface{}, 0, len(elements)) + + for _, element := range elements { switch elem := element.(type) { case *Paragraph: - // 检查段落是否包含图片占位符 - newElements, err := te.processImagePlaceholdersInParagraph(elem, data, doc) + replaced, err := te.processImagePlaceholdersInParagraph(elem, data, doc) if err != nil { return err } - - // 如果有图片替换,更新文档元素 - if len(newElements) > 1 || (len(newElements) == 1 && newElements[0] != elem) { - // 移除原段落,插入新元素(可能包含图片段落) - doc.Body.Elements = append(doc.Body.Elements[:i], append(newElements, doc.Body.Elements[i+1:]...)...) + if len(replaced) == 0 { + // 理论上不会发生,但防御性处理:保留原段落 + newElements = append(newElements, elem) + continue } + newElements = append(newElements, replaced...) case *Table: // 处理表格中的图片占位符 (Fix for Issue #91) if err := te.processImagePlaceholdersInTable(elem, data, doc); err != nil { return err } + newElements = append(newElements, elem) + default: + newElements = append(newElements, element) } } + + doc.Body.Elements = newElements return nil } diff --git a/pkg/markdown/README.md b/pkg/markdown/README.md index 4e3464d..3fadb29 100644 --- a/pkg/markdown/README.md +++ b/pkg/markdown/README.md @@ -25,7 +25,7 @@ package main import ( "fmt" - "github.com/zerx-lab/wordZero/pkg/markdown" + "github.com/hiyali/wordZero/pkg/markdown" ) func main() { @@ -50,7 +50,7 @@ package main import ( "fmt" - "github.com/zerx-lab/wordZero/pkg/markdown" + "github.com/hiyali/wordZero/pkg/markdown" ) func main() { @@ -75,7 +75,7 @@ package main import ( "fmt" - "github.com/zerx-lab/wordZero/pkg/markdown" + "github.com/hiyali/wordZero/pkg/markdown" ) func main() { diff --git a/pkg/markdown/config.go b/pkg/markdown/config.go index f2a04d0..a77def8 100644 --- a/pkg/markdown/config.go +++ b/pkg/markdown/config.go @@ -1,7 +1,7 @@ // Package markdown 提供Markdown到Word文档的转换功能 package markdown -import "github.com/zerx-lab/wordZero/pkg/document" +import "github.com/hiyali/wordZero/pkg/document" // ConvertOptions 转换选项配置 type ConvertOptions struct { diff --git a/pkg/markdown/converter.go b/pkg/markdown/converter.go index 4c57aeb..7f62457 100644 --- a/pkg/markdown/converter.go +++ b/pkg/markdown/converter.go @@ -12,7 +12,7 @@ import ( mathjax "github.com/litao91/goldmark-mathjax" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) // MarkdownConverter Markdown转换器接口 diff --git a/pkg/markdown/exporter.go b/pkg/markdown/exporter.go index fe99867..4e6d055 100644 --- a/pkg/markdown/exporter.go +++ b/pkg/markdown/exporter.go @@ -6,7 +6,7 @@ import ( "path/filepath" "strings" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) // WordToMarkdownExporter Word到Markdown导出器接口 diff --git a/pkg/markdown/renderer.go b/pkg/markdown/renderer.go index b14f7c6..689dd40 100644 --- a/pkg/markdown/renderer.go +++ b/pkg/markdown/renderer.go @@ -5,7 +5,7 @@ import ( "regexp" "strings" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" "github.com/yuin/goldmark/ast" // 添加goldmark扩展的AST节点支持 diff --git a/pkg/markdown/writer.go b/pkg/markdown/writer.go index a0be861..c1bdbea 100644 --- a/pkg/markdown/writer.go +++ b/pkg/markdown/writer.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) // ExportOptions 导出选项配置 diff --git a/pkg/style/README.md b/pkg/style/README.md index 0fb6ac9..2cccf7e 100644 --- a/pkg/style/README.md +++ b/pkg/style/README.md @@ -24,7 +24,7 @@ WordZero 的样式管理包提供了完整的 Word 文档样式系统实现, ## 📦 安装使用 ```go -import "github.com/zerx-lab/wordZero/pkg/style" +import "github.com/hiyali/wordZero/pkg/style" ``` ## 🚀 快速开始 @@ -68,7 +68,7 @@ if err == nil { ### 在文档中应用样式 ```go -import "github.com/zerx-lab/wordZero/pkg/document" +import "github.com/hiyali/wordZero/pkg/document" // 创建文档 doc := document.New() @@ -381,8 +381,8 @@ package main import ( "fmt" "log" - "github.com/zerx-lab/wordZero/pkg/document" - "github.com/zerx-lab/wordZero/pkg/style" + "github.com/hiyali/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/style" ) func main() { diff --git a/test/cell_iterator_integration_test.go b/test/cell_iterator_integration_test.go index 8012a3c..33aac8d 100644 --- a/test/cell_iterator_integration_test.go +++ b/test/cell_iterator_integration_test.go @@ -5,7 +5,7 @@ import ( "path/filepath" "testing" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) // TestCellIteratorIntegration 单元格迭代器功能集成测试 diff --git a/test/debug_page_settings_test.go b/test/debug_page_settings_test.go index b6fdf22..0ac185a 100644 --- a/test/debug_page_settings_test.go +++ b/test/debug_page_settings_test.go @@ -5,7 +5,7 @@ import ( "math" "testing" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func TestDebugPageSettings(t *testing.T) { diff --git a/test/debug_settings.go b/test/debug_settings.go index 6cc7a77..f12dee4 100644 --- a/test/debug_settings.go +++ b/test/debug_settings.go @@ -4,7 +4,7 @@ import ( "encoding/xml" "fmt" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func DebugSettings() { diff --git a/test/document_test.go b/test/document_test.go index ec15363..a8be0a2 100644 --- a/test/document_test.go +++ b/test/document_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func TestCreateDocument(t *testing.T) { diff --git a/test/footnotes_test.go b/test/footnotes_test.go index 922b3a1..f721719 100644 --- a/test/footnotes_test.go +++ b/test/footnotes_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func TestFootnoteConfig(t *testing.T) { diff --git a/test/markdown_math_test.go b/test/markdown_math_test.go index af34e12..82d2352 100644 --- a/test/markdown_math_test.go +++ b/test/markdown_math_test.go @@ -5,7 +5,7 @@ import ( "path/filepath" "testing" - "github.com/zerx-lab/wordZero/pkg/markdown" + "github.com/hiyali/wordZero/pkg/markdown" ) // TestMarkdownMathFormulaConversion 测试Markdown数学公式转换 diff --git a/test/markdown_table_tasklist_test.go b/test/markdown_table_tasklist_test.go index 834fa5f..6492a2f 100644 --- a/test/markdown_table_tasklist_test.go +++ b/test/markdown_table_tasklist_test.go @@ -3,7 +3,7 @@ package test import ( "testing" - "github.com/zerx-lab/wordZero/pkg/markdown" + "github.com/hiyali/wordZero/pkg/markdown" ) // TestMarkdownTableConversion 测试Markdown表格转换 diff --git a/test/nested_table_template_test.go b/test/nested_table_template_test.go index 911d13a..b9ad221 100644 --- a/test/nested_table_template_test.go +++ b/test/nested_table_template_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) // TestNestedTableTemplate 测试嵌套表格模板功能 diff --git a/test/page_settings_test.go b/test/page_settings_test.go index 5be0ad0..aa3e938 100644 --- a/test/page_settings_test.go +++ b/test/page_settings_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "testing" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) // TestPageSettingsIntegration 页面设置功能集成测试 diff --git a/test/parse_elements_test.go b/test/parse_elements_test.go index 468c6de..6dba66d 100644 --- a/test/parse_elements_test.go +++ b/test/parse_elements_test.go @@ -3,7 +3,7 @@ package test import ( "testing" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) // TestParseElementsIntegration 测试解析不同类型元素的集成测试 diff --git a/test/real_world_nested_table_test.go b/test/real_world_nested_table_test.go index 2fabf92..7a46213 100644 --- a/test/real_world_nested_table_test.go +++ b/test/real_world_nested_table_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) // TestRealWorldNestedTableScenario 测试真实场景:简历中的家庭成员表格 diff --git a/test/table_default_style_test.go b/test/table_default_style_test.go index a4e7b3b..e635439 100644 --- a/test/table_default_style_test.go +++ b/test/table_default_style_test.go @@ -3,7 +3,7 @@ package test import ( "testing" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) // TestTableDefaultStyle 测试表格默认样式 diff --git a/test/table_dynamic_merge_validation_test.go b/test/table_dynamic_merge_validation_test.go index 569e216..ea61d26 100644 --- a/test/table_dynamic_merge_validation_test.go +++ b/test/table_dynamic_merge_validation_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) // TestTableDynamicRowMergeValidation 验证动态添加行后合并单元格是否会导致错位 diff --git a/test/table_insert_merge_fix_test.go b/test/table_insert_merge_fix_test.go index 05c84f9..d1ba3a0 100644 --- a/test/table_insert_merge_fix_test.go +++ b/test/table_insert_merge_fix_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) // TestTableInsertAndMergeFix 测试动态添加行后合并单元格的修复 diff --git a/test/table_style_test.go b/test/table_style_test.go index f5cec93..ee41b17 100644 --- a/test/table_style_test.go +++ b/test/table_style_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) // TestTableBorders 测试表格边框功能 diff --git a/test/template_inheritance_test.go b/test/template_inheritance_test.go index 68f6a16..d0ed1fc 100644 --- a/test/template_inheritance_test.go +++ b/test/template_inheritance_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) // TestTemplateInheritanceComplete 完整的模板继承测试 diff --git a/test/template_style_test.go b/test/template_style_test.go index 30d69b6..13f0351 100644 --- a/test/template_style_test.go +++ b/test/template_style_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/zerx-lab/wordZero/pkg/document" - "github.com/zerx-lab/wordZero/pkg/style" + "github.com/hiyali/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/style" ) // TestTemplateStylePreservation 测试模板渲染时样式保持 diff --git a/test/template_test.go b/test/template_test.go index 3b28875..01cfecc 100644 --- a/test/template_test.go +++ b/test/template_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) // TestTemplateIntegration 模板功能集成测试 diff --git a/test/text_formatting_test.go b/test/text_formatting_test.go index 8f3a585..5476734 100644 --- a/test/text_formatting_test.go +++ b/test/text_formatting_test.go @@ -5,7 +5,7 @@ import ( "path/filepath" "testing" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func TestTextFormatting(t *testing.T) { diff --git a/test/toc_update_test.go b/test/toc_update_test.go index 2e3998d..22f5536 100644 --- a/test/toc_update_test.go +++ b/test/toc_update_test.go @@ -6,7 +6,7 @@ import ( "path/filepath" "testing" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) // TestTOCUpdate 测试UpdateTOC功能 diff --git a/validation/comprehensive_issue_check.go b/validation/comprehensive_issue_check.go index 2d8f997..5a8a089 100644 --- a/validation/comprehensive_issue_check.go +++ b/validation/comprehensive_issue_check.go @@ -9,7 +9,7 @@ import ( "path/filepath" "strings" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/validation/go.mod b/validation/go.mod index c0c35fe..3039c68 100644 --- a/validation/go.mod +++ b/validation/go.mod @@ -1,12 +1,12 @@ -module github.com/zerx-lab/wordZero/validation +module github.com/hiyali/wordZero/validation go 1.19 -require github.com/zerx-lab/wordZero v0.0.0 +require github.com/hiyali/wordZero v0.0.0 require ( github.com/litao91/goldmark-mathjax v0.0.0-20210217064022-a43cf739a50f // indirect github.com/yuin/goldmark v1.7.8 // indirect ) -replace github.com/zerx-lab/wordZero => ../ +replace github.com/hiyali/wordZero => ../ diff --git a/validation/issue_reproduction.go b/validation/issue_reproduction.go index fa7dc43..0d18fe1 100644 --- a/validation/issue_reproduction.go +++ b/validation/issue_reproduction.go @@ -11,7 +11,7 @@ import ( "path/filepath" "strings" - "github.com/zerx-lab/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/document" ) func main() { diff --git a/validation/main.go b/validation/main.go index 64af824..ed58a12 100644 --- a/validation/main.go +++ b/validation/main.go @@ -11,9 +11,9 @@ import ( "path/filepath" "strings" - "github.com/zerx-lab/wordZero/pkg/document" - "github.com/zerx-lab/wordZero/pkg/markdown" - "github.com/zerx-lab/wordZero/pkg/style" + "github.com/hiyali/wordZero/pkg/document" + "github.com/hiyali/wordZero/pkg/markdown" + "github.com/hiyali/wordZero/pkg/style" ) // TestResult represents the result of a single test