Skip to content

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

Open

Description

@DanilBraun

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

Activity

  1. changed the title [-]Cyrillic titles / chapters / etc. generate incorrect links[/-] [+]Cyrillic titles / sections / etc. generate incorrect links[/+] on Jan 9, 2023
  2. wwall commented on Jan 31, 2023

    @wwall

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions