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

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

Closed
2 tasks done
panlm opened this issue Oct 5, 2023 · 2 comments
Closed
2 tasks done
Assignees
Labels
💎 Obsidian Github Publisher Related to the plugin ✨ Enhancement New feature or request

Comments

@panlm
Copy link

panlm commented Oct 5, 2023

Issue validation

  • I checked the issue to prevent duplicate
  • I checked my configurations files and the documentation

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.
@panlm panlm added 🐛 Bug Something isn't working 💎 Obsidian Github Publisher Related to the plugin labels Oct 5, 2023
@Mara-Li
Copy link
Member

Mara-Li commented Oct 5, 2023

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

@Mara-Li Mara-Li changed the title [Plugin][Bug]: should skip code block (```shell) when converting [[wikilinks]] to markdown links [Plugin][FR]: should skip code block (```shell) when converting [[wikilinks]] to markdown links Oct 5, 2023
@Mara-Li Mara-Li added ✨ Enhancement New feature or request and removed 🐛 Bug Something isn't working labels Oct 5, 2023
@Mara-Li
Copy link
Member

Mara-Li commented Oct 5, 2023

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

@Mara-Li Mara-Li closed this as completed in f3fd6de Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 Obsidian Github Publisher Related to the plugin ✨ Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants