Skip to content

使引用本书其他章节的超链接能正常跳转到对应小节 #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hagb
Copy link

@Hagb Hagb commented May 1, 2025

这个 PR 做了这些事情:

  1. 提供了一个脚本 functional-programming-lean/scripts/sync-title-id.py 来将原文的章节标题的 id 同步到译文(其语法见于 https://github.com/rust-lang/mdBook/blob/v0.4.30/guide/src/format/markdown.md#heading-attributes ,需要更新 mdbook 到 >= 0.4.30 的版本);
  2. 同步过程删除了一些译文中相较原文多出来的大标题,如 functional-programming-lean/src/introduction.md 处的 # 引言,修复了一些标题级别与原文不对应的情况;
  3. 将使用译文作为 fragment identifiers 的超链接改为使用原文 fragment identifiers,如 functional-programming-lean/src/monads/class.md 处的
    - 如[本章简介](../monads.md#对树节点编号)所介绍的,`State σ α`表示使用类型为 `σ` 的可变变量,并返回类型为 `α` 的值的程序。
    + 如[本章简介](../monads.md#numbering-tree-nodes)所介绍的,`State σ α`表示使用类型为 `σ` 的可变变量,并返回类型为 `α` 的值的程序。

效果见于:https://hagb.name/fp-lean-zh/

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