Skip to content
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

Cyrillic titles / sections / etc. generate incorrect links #359

Open
danilbraun opened this issue Jan 9, 2023 · 1 comment
Open

Cyrillic titles / sections / etc. generate incorrect links #359

danilbraun opened this issue Jan 9, 2023 · 1 comment

Comments

@danilbraun
Copy link

danilbraun commented Jan 9, 2023

The cyrillic letters are replaced by underscores in the links, and if the names of two sections have the same length (the same number of characters), the link to two different sections will be the same.

DrRacket

Brave browser

@danilbraun danilbraun changed the title Cyrillic titles / chapters / etc. generate incorrect links Cyrillic titles / sections / etc. generate incorrect links Jan 9, 2023
@wwall
Copy link

wwall commented Jan 31, 2023

for cyrillic letters you can edit regexp in file racket/pkgs/scribble-lib/scribble/private/tag.rkt in function gen-tag and add "а-яА-Я"
quickfix

(define (gen-tag content)
  (datum-intern-literal
   ;; Generate tag from ASCII plus CJK characters. Constraining to
   ;; ASCII for most purposes helps avoid encoding issues for
   ;; uncooperative environments, but constraining to ASCII is too
   ;; uncooperative in another direction for CJK text (i.e., creates
   ;; too many conflicting tags).
   (regexp-replace* #px"[^-А-Яа-яa-zA-Z0-9_=\u4e00-\u9fff\u3040-\u309F\u30A0-\u30FF]"
                    (content->string content) "_")))

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

No branches or pull requests

2 participants