Enveloppe / obsidian-enveloppe

Enveloppe helps you to publish your notes on a GitHub repository from your Obsidian Vault, for free!

Home Page:https://enveloppe.ovh/

Repository from Github https://github.comEnveloppe/obsidian-enveloppeRepository from Github https://github.comEnveloppe/obsidian-enveloppe

[Bug]: When "Sluglify anchor in markdown links" is turned on, the Chinese characters of the anchor content will be deleted.

miaogaolin opened this issue · comments

Issue validation

  • I checked the issue to prevent duplicate
  • I checked my configurations files and the documentation
  • My issue concern doesn't concern the Mkdocs template

Command used

No response

Plugin version

6.12.5

Describe the bug

image

It should be caused by the slugify function

How to reproduce ?

No response

Minimal Reproducible Example

[[test#图片占位符]]

Configuration

{
  "github": {
    "branch": "main",
    "automaticallyMergePR": false,
    "tokenPath": "%configDir%/plugins/%pluginID%/env",
    "api": {
      "tiersForApi": "Github Free/Pro/Team (default)",
      "hostname": ""
    },
    "workflow": {
      "commitMessage": "[PUBLISHER] Merge",
      "name": ""
    },
    "verifiedRepo": true
  },
  "upload": {
    "behavior": "yaml",
    "defaultName": "content/posts",
    "rootFolder": "content",
    "yamlFolderKey": "dir",
    "frontmatterTitle": {
      "enable": false,
      "key": "title"
    },
    "replaceTitle": [],
    "replacePath": [],
    "autoclean": {
      "enable": false,
      "excluded": []
    },
    "folderNote": {
      "enable": false,
      "rename": "index.md",
      "addTitle": {
        "enable": false,
        "key": "title"
      }
    },
    "metadataExtractorPath": ""
  },
  "conversion": {
    "hardbreak": false,
    "dataview": true,
    "censorText": [
      {
        "entry": "/\\]\\(([^)\\.]+)\\.md/",
        "replace": "]({{< relref \"$1.md\" >}}",
        "flags": "",
        "after": true,
        "inCodeBlocks": false
      },
      {
        "entry": "/cover\\.image/",
        "replace": "cover:\\n    image",
        "flags": "",
        "after": false
      },
      {
        "entry": "/\\]\\(([^/]+?)\\.(png|jpg|jpeg|webp|gif)/",
        "replace": "](/images/$1.$2",
        "flags": "",
        "after": true
      },
      {
        "entry": "/\\!\\[\\[([^/]+?)\\.(png|jpg|jpeg|webp|gif)\\|(\\d+)(x(\\d+))?\\]\\]/",
        "replace": "{{< figure src=\"/images/$1.$2\"  width=\"$3\" height=\"$5\">}}",
        "flags": "",
        "after": false
      },
      {
        "entry": "/\\!\\[\\[([^/]+?)\\.(png|jpg|jpeg|webp|gif)\\|([^\\|]*?)(\\|(\\d+)(x(\\d+))?)?\\]\\]/",
        "replace": "{{< figure src=\"/images/$1.$2\" caption=\"$3\" width=\"$5\" height=\"$7\">}}",
        "flags": "",
        "after": false
      }
    ],
    "tags": {
      "inline": true,
      "exclude": [],
      "fields": []
    },
    "links": {
      "internal": false,
      "unshared": false,
      "wiki": true,
      "slugify": true
    }
  },
  "embed": {
    "attachments": true,
    "overrideAttachments": [],
    "keySendFile": [],
    "notes": false,
    "folder": "static/images",
    "convertEmbedToLinks": "keep",
    "charConvert": "->",
    "forcePushAttachments": [],
    "useObsidianFolder": false
  }
}

Relevant log output

No response

OS

Windows

Anything else?

No response

Obsidian information

v1.5.3

I'm sorry, it's seems that the package slugify is in the cause. As it not mine, I think you must open an issue on this repository instead of mine.

Can this solution be used?

str.toLowerCase().replaceAll(" ", "-")

The problem is that slugify also replace special text.
But I can make an option in slufigy to choose your methods to do so. I will do it later :)

Thanks a bunch.