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

[Bug]: content is being deleted after migration from 4v to 6v #266

Open
3 tasks done
kurko opened this issue Dec 29, 2023 · 2 comments
Open
3 tasks done

[Bug]: content is being deleted after migration from 4v to 6v #266

kurko opened this issue Dec 29, 2023 · 2 comments
Assignees
Labels
❓ Question Further information is requested 💤 Stale Inactive issue

Comments

@kurko
Copy link
Contributor

kurko commented Dec 29, 2023

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

Upload single current active note

Plugin version

6.12.5

Describe the bug

When publishing a file over an existing content, it is deleting tons of text. It seems to coincide with the code backticks.

For example, here's the removal taking place (which you can see in this pull request):

Screenshot 2023-12-28 at 23 44 31

However, the content in Obsidian is there:

Screenshot 2023-12-28 at 23 44 50

Coincidentally, it strips out everything after the code.


Here's a counter example of something that works:

Screenshot 2023-12-28 at 23 46 36

Shows up correctly as:

Screenshot 2023-12-28 at 23 48 07

How to reproduce ?

I'm having a hard time reproducing this one.

Minimal Reproducible Example

You can use this one, which is what I used in the screenshots above.

https://gist.githubusercontent.com/kurko/fe0835f16e7ee2c9f17abf7d932651e5/raw/350d5d54b592f8886e02c80e84af195b6b3f8912/test.md

Configuration

I removed my customized regex and the problem is still there.

{
  "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": "fixed",
    "defaultName": "obsidian",
    "rootFolder": "",
    "yamlFolderKey": "",
    "frontmatterTitle": {
      "enable": true,
      "key": "filename"
    },
    "replaceTitle": [
      {
        "type": "title"
      }
    ],
    "replacePath": [
      {
        "regex": "",
        "replacement": "",
        "type": "path"
      }
    ],
    "autoclean": {
      "enable": true,
      "excluded": ""
    },
    "folderNote": {
      "enable": false,
      "rename": "index.md",
      "addTitle": {
        "enable": false,
        "key": "filename"
      }
    },
    "metadataExtractorPath": ""
  },
  "conversion": {
    "hardbreak": false,
    "dataview": false,
    "censorText": [],
    "tags": {
      "inline": false,
      "exclude": [],
      "fields": []
    },
    "links": {
      "internal": true,
      "unshared": false,
      "wiki": true,
      "slugify": false
    }
  },
  "embed": {
    "attachments": true,
    "overrideAttachments": [],
    "keySendFile": [
      "obsidian"
    ],
    "notes": false,
    "folder": "images/obsidian",
    "convertEmbedToLinks": "keep",
    "charConvert": "->",
    "forcePushAttachments": [],
    "useObsidianFolder": false
  }
}

Relevant log output

No response

OS

MacOS

Anything else?

No response

Obsidian information

SYSTEM INFO:
	Obsidian version: v1.5.3
	Installer version: v1.4.16
	Operating system: Darwin Kernel Version 23.2.0: Wed Nov 15 21:59:33 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8112 23.2.0
	Login status: logged in
	Catalyst license: insider
	Insider build toggle: off
	Live preview: off
	Base theme: light
	Community theme: obsidian_ia
	Snippets enabled: 1
	Restricted mode: off
	Plugins installed: 13
	Plugins enabled: 9
		1: Mind Map v1.1.0
		2: Tag Wrangler v0.5.3
		3: Metadata Extractor v1.0.2
		4: Dataview v0.5.46
		5: Force note view mode v1.1.1
		6: Obsidian42 - BRAT v0.6.35
		7: Reading Time v1.1.1
		8: Local images v0.14.2
		9: Github Publisher v6.12.5

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.
@kurko kurko added the 🐛 Bug Something isn't working label Dec 29, 2023
@kurko
Copy link
Contributor Author

kurko commented Dec 29, 2023

New detail found: if I omit the language name from the backticks (e.g if I take the ```java line and remove java), then it hides the snippet only, not all the rest of the content.

Screenshot 2023-12-28 at 23 55 23

Notice that now it only removes the code itself.

Screenshot 2023-12-28 at 23 55 16

I think the code parser needs a revamp?

@Mara-Li
Copy link
Member

Mara-Li commented Dec 29, 2023

Pretty strange that I don't success to reproduce with the same file :(

@Mara-Li Mara-Li added 💤 Stale Inactive issue ❓ Question Further information is requested and removed 🐛 Bug Something isn't working labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓ Question Further information is requested 💤 Stale Inactive issue
Projects
None yet
Development

No branches or pull requests

2 participants