Skip to content

Comments

refactor: deduplicate tex_to_zhihu and tex_to_zhihu_url#16

Merged
drmingdrmer merged 1 commit intomasterfrom
fix/tex-to-zhihu-duplication
Feb 22, 2026
Merged

refactor: deduplicate tex_to_zhihu and tex_to_zhihu_url#16
drmingdrmer merged 1 commit intomasterfrom
fix/tex-to-zhihu-duplication

Conversation

@drmingdrmer
Copy link
Contributor

Summary

  • Extract shared logic into _zhihu_tex_params helper
  • Both functions now call the helper instead of duplicating tex_to_zhihu_compatible call and align computation
  • Net reduction: 32 lines removed, 13 added

Test plan

  • make test - all 14 tests pass
  • make lint - all checks pass

Extract shared logic (tex_to_zhihu_compatible call, align computation)
into _zhihu_tex_params helper so changes to align logic only need to
be made in one place.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@drmingdrmer drmingdrmer merged commit 68d6ae9 into master Feb 22, 2026
12 checks passed
@drmingdrmer drmingdrmer deleted the fix/tex-to-zhihu-duplication branch February 22, 2026 12:04
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.

1 participant