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

Fix Issues with Local Image Links Containing Cyrillic Characters #573

Open
martyanovandrey opened this issue Nov 19, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@martyanovandrey
Copy link
Contributor

Description
Address the problem where local image links with Cyrillic characters in filenames fail to resolve during document compilation. Currently, links like ![русские-символы](русские-символы.png) result in an error, as the encoding changes and the build process cannot locate the files.

Problem

  • When linking images with Cyrillic names, the system encodes these characters, leading to file-not-found errors.
  • Example error: ERR Asset not found: %D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B5-%D1%81%D0%B8%D0%BC%D0%B2%D0%BE%D0%BB%D1%8B.png in /whats-new.md.

Proposed Solution

  • Implement a mechanism to properly handle and decode local image paths containing Cyrillic or non-ASCII characters during the build process.
  • Ensure compatibility with both encoded and unencoded paths.

Benefits

  • Enables the use of local images with Cyrillic filenames, broadening accessibility and usability for Russian and other non-ASCII languages.
  • Improves user experience by preventing compilation errors related to asset paths.

Acceptance Criteria

  • Local image links with Cyrillic characters in filenames resolve correctly, and relevant images are displayed without errors.
  • Update documentation to include examples of using local image links with non-ASCII characters.
  • Conduct testing to ensure reliable performance across various character sets.

Additional Notes

  • Review the handling of filenames in different operating systems to ensure consistent behavior.
  • Consider edge cases where filenames might contain mixed character sets or special symbols.

Entry point for development

const href = getHrefTokenAttr(linkToken);

export function getHrefTokenAttr(token: Token) {

@martyanovandrey martyanovandrey moved this to Todo in Help wanted Nov 19, 2024
@martyanovandrey martyanovandrey added the bug Something isn't working label Nov 19, 2024
@martyanovandrey martyanovandrey moved this from Todo to In progress in Help wanted Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In progress
Development

No branches or pull requests

1 participant