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

Problem with russian characters #26

Closed
apkraft opened this issue Nov 2, 2018 · 9 comments
Closed

Problem with russian characters #26

apkraft opened this issue Nov 2, 2018 · 9 comments
Labels
👀 no/external This makes more sense somewhere else

Comments

@apkraft
Copy link

apkraft commented Nov 2, 2018

With the header '# Профили пользователей' and the link

[«Профили пользователей»](#профили-пользователей)

in the markdown file remark-validate-links gives an error:

5:405-5:462 warning Link to unknown heading: 'профили-пользователей'. Did you mean 'Профили-пользователей' missing-heading remark-validate-links
(capital letter)

Can you please fix it?

@wooorm
Copy link
Member

wooorm commented Nov 2, 2018

@apkraft Welcome!

Please take a look at the contributing.md docs to see how you can create an issue that we can help with. Especially the “Submitting an issue” section is good.

As it is, you didn’t provide enough info for someone to help you.

@apkraft
Copy link
Author

apkraft commented Nov 2, 2018

@wooorm Thank you for correction.

I have a project with content.md file in it. In this file I have a text like this:

# Введение

Вы можете создать профили пользователей с разными правами доступа к телеканалам и услугам. Подробнее в разделе [«Профили пользователей»](#профили-пользователей).

Имя текущего профиля пользователя отображается в **Главном меню** в верхней части экрана.

## Профили пользователей

Чтобы создать или отредактировать профиль.

My package.json looks like this:

{
    "name": "md_lint_app",
    "scripts": {
        "lint-md": "remark"
    },
    "remarkConfig": {
        "plugins": [
            "validate-links"
        ]
    },
    "dependencies": {
        "remark": "^9.0.0",
        "remark-cli": "^5.0.0",
        "remark-lint": "^6.0.2",
        "remark-validate-links": "^7.1.0"
    }
}

After executing remark-lint I have this log:

> md_lint_app@ lint-md /usr/src/remark-lint
> remark "./files_to_lint/" "-q" "--no-color"

files_to_lint/content.md
  5:405-5:454  warning  Link to unknown heading: `профили-пользователей`. Did you mean `Профили-пользователей`  missing-heading  remark-validate-links

⚠ 1 warning

The problem is that remark-validate-links plugin wants "Профили-пользователей" instead of "профили-пользователей" in the link [«Профили пользователей»](#профили-пользователей). This applies only to links in Russian.

I attached all files but with .txt extension to upload:
package.json.txt
linter.log
content.md.txt

.

@wooorm
Copy link
Member

wooorm commented Nov 2, 2018

Thanks! Why do you believe the heading link is different than remark-validate-links suggests?
The code works based on GitHub’s slugging. Do you have content.md somewhere on GitHub?

@apkraft
Copy link
Author

apkraft commented Nov 2, 2018

I put it here: https://github.com/apkraft/temp

For example,

[First header](#first-header) — is ok.
[First header](#First-header) — not ok.
[Первый заголовок](#первый-заголовок) — not ok
[Первый заголовок](#Первый-заголовок) — is ok

wooorm added a commit to Flet/github-slugger that referenced this issue Nov 2, 2018
@wooorm
Copy link
Member

wooorm commented Nov 2, 2018

Thanks for reporting this. It’s an issue in github-slugger. I opened a PR there: Flet/github-slugger#17.

@apkraft
Copy link
Author

apkraft commented Nov 3, 2018

Thank you!

wooorm added a commit to Flet/github-slugger that referenced this issue Jan 8, 2019
@wooorm
Copy link
Member

wooorm commented Jan 8, 2019

I’ve merged some stuff in github-slugger. Hope we can release that soon and get this in here!

@wooorm
Copy link
Member

wooorm commented Jan 9, 2019

This is fixed btw, because github-slugger released with a fix for this as a patch!

@wooorm wooorm closed this as completed Jan 9, 2019
@apkraft
Copy link
Author

apkraft commented Jan 16, 2019

This is fixed btw, because github-slugger released with a fix for this as a patch!

Thank you!

@wooorm wooorm added the 👀 no/external This makes more sense somewhere else label Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 no/external This makes more sense somewhere else
Development

No branches or pull requests

2 participants