Enveloppe / obsidian-enveloppe

Enveloppe helps you to publish your notes on a GitHub repository from your Obsidian Vault, for free!
https://enveloppe.github.io/
Apache License 2.0
618 stars 38 forks source link

[Plugin][FR]: should skip code block (```shell) when converting [[wikilinks]] to markdown links #228

Closed panlm closed 11 months ago

panlm commented 11 months ago

Issue validation

Command used

No response

Plugin version

6.7.4

Describe the bug

my ob note like:

    if [[ ${CONN_STAT} == 'connected' ]]; then
        break
    fi

after it been uploaded to github, it changes to:

    if [ ${CONN_STAT} == 'connected' ]($%7BCONN_STAT%7D%20==%20'connected'.md); then
        break
    fi

How to reproduce ?

No response

Minimal Reproducible Example

see description

Configuration

{
  "github": {
    "branch": "main",
    "automaticallyMergePR": true,
    "tokenPath": "%configDir%/plugins/%pluginID%/env",
    "api": {
      "tiersForApi": "Github Free/Pro/Team (default)",
      "hostname": ""
    },
    "workflow": {
      "commitMessage": "[PUBLISHER] Merge",
      "name": ""
    },
    "verifiedRepo": true
  },
  "upload": {
    "behavior": "obsidian",
    "defaultName": "docs",
    "rootFolder": "docs",
    "yamlFolderKey": "category",
    "frontmatterTitle": {
      "enable": false,
      "key": "title"
    },
    "replaceTitle": [],
    "replacePath": [
      {
        "regex": "git-ob",
        "replacement": "",
        "type": "path"
      }
    ],
    "autoclean": {
      "enable": true,
      "excluded": [
        "docs/assets/js",
        "docs/assets/meta",
        "docs/assets/css",
        "tags.md",
        "graph.md"
      ]
    },
    "folderNote": {
      "enable": false,
      "rename": "index.md"
    },
    "metadataExtractorPath": ""
  },
  "conversion": {
    "hardbreak": false,
    "dataview": true,
    "censorText": [
      {
        "entry": "/[0-9]{12}/g",
        "replace": "123456789012",
        "flags": "",
        "after": false
      }
    ],
    "tags": {
      "inline": false,
      "exclude": [],
      "fields": []
    },
    "links": {
      "internal": true,
      "unshared": false,
      "wiki": true,
      "slugify": false
    }
  },
  "embed": {
    "attachments": true,
    "keySendFile": [],
    "notes": false,
    "folder": "docs/attachment",
    "convertEmbedToLinks": "keep",
    "charConvert": "->"
  }
}

Relevant log output

No response

OS

MacOS

Anything else?

No response

Obsidian information

SYSTEM INFO:
    Obsidian version: v1.4.14
    Installer version: v1.4.13
    Operating system: Darwin Kernel Version 22.6.0: Wed Jul  5 22:21:56 PDT 2023; root:xnu-8796.141.3~6/RELEASE_X86_64 22.6.0
    Login status: not logged in
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: Minimal v7.2.3
    Snippets enabled: 3
    Restricted mode: off
    Plugins installed: 34
    Plugins enabled: 25
        1: Dataview v0.5.59
        2: File path to URI v1.4.1
        3: Advanced Tables v0.19.1
        4: Find orphaned files and broken links v1.9.1
        5: Paste URL into selection v1.7.0
        6: Admonition v10.1.1
        7: Hotkeys for templates v1.4.3
        8: Mind Map v1.1.0
        9: Highlightr v1.2.2
        10: Meld Encrypt v2.3.2
        11: Tag Wrangler v0.6.1
        12: Text expand v0.11.4
        13: Dynamic Table of Contents v0.0.27
        14: Filename Heading Sync v1.9.0
        15: Advanced URI v1.38.1
        16: Copy Block Link v1.0.4
        17: Wikilinks to MDLinks v0.0.12
        18: Text Format v2.2.8
        19: Obsidian Enhancing Export v1.9.1
        20: Table of Contents v0.2.0
        21: Minimal Theme Settings v7.2.4
        22: Obsidian42 - BRAT v0.7.0
        23: Query Control v0.5.0
        24: Various Complements v9.0.0
        25: Github Publisher v6.7.4

RECOMMENDATIONS:
    Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
    Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.
Mara-Li commented 11 months ago

Note to self: technically, any transformation on the text (excluding regex?) should skip if in codeblock

Mara-Li commented 11 months ago

Okay, it should works, now. Could you try ?