Code block Display disorder in unorder list!

Before opening a new bug report, please search the forum for duplicates and follow the Troubleshooting Guide.

  • We only consider bugs that are reproducible in the sandbox vault or a vault with no third-party plugins/no css snippets/default theme.
  • For Linux, we only accept bug reports that are reproducible with our Appimage package under Gnome or KDE.
  • Developer issues with the API should go here

Once you’ve done the above, delete everything above this line.

Steps to reproduce

  • line1
    code here
    
    
    

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

the code block display correct

Actual result

the code block display disorder

Environment

{
  "process": {
    "arch": "x64",
    "platform": "win32"
  },
  "app": {
    "internalPlugins": {
      "config": {
        "file-explorer": true,
        "global-search": true,
        "switcher": true,
        "graph": true,
        "backlink": true,
        "canvas": true,
        "outgoing-link": false,
        "tag-pane": true,
        "page-preview": true,
        "daily-notes": true,
        "templates": false,
        "note-composer": true,
        "command-palette": true,
        "slash-command": false,
        "editor-status": true,
        "bookmarks": true,
        "markdown-importer": false,
        "zk-prefixer": true,
        "random-note": false,
        "outline": true,
        "word-count": true,
        "slides": true,
        "audio-recorder": false,
        "workspaces": true,
        "file-recovery": false,
        "publish": false,
        "sync": false,
        "properties": false
      }
    },
    "isMobile": false,
    "plugins": {
      "enabledPlugins": [
        "table-editor-obsidian",
        "remotely-save",
        "templater-obsidian",
        "dataview",
        "file-explorer-note-count",
        "obsidian-auto-link-title",
        "better-word-count",
        "obsidian-style-settings",
        "obsidian-outliner",
        "obsidian-another-quick-switcher",
        "float-search",
        "obsidian-custom-frames",
        "obsidian-file-link",
        "obsidian-weread-plugin",
        "better-search-views",
        "obsidian-list-callouts",
        "obsidian-local-images-plus",
        "obsidian-git",
        "spreadsheets",
        "obsidian-hotkeys-for-specific-files",
        "calendar",
        "mousewheel-image-zoom",
        "obsidian-copy-block-link",
        "obsidian-linter",
        "obsidian-excalidraw-plugin",
        "obsidian-banners",
        "obsidian-minimal-settings",
        "obsidian-admonition",
        "obsidian-projects",
        "quickadd"
      ],
      "manifests": {
        "better-search-views": {
          "version": "0.2.2"
        },
        "better-word-count": {
          "version": "0.10.0"
        },
        "calendar": {
          "version": "1.5.10"
        },
        "cmdr": {
          "version": "0.5.1"
        },
        "dataview": {
          "version": "0.5.64"
        },
        "easy-typing-obsidian": {
          "version": "5.1.12"
        },
        "file-explorer-note-count": {
          "version": "1.2.1"
        },
        "float-search": {
          "version": "3.4.5"
        },
        "homepage": {
          "version": "3.6.0"
        },
        "mousewheel-image-zoom": {
          "version": "1.0.19"
        },
        "obsidian-admonition": {
          "version": "10.1.1"
        },
        "obsidian-advanced-uri": {
          "version": "1.38.1"
        },
        "obsidian-annotator": {
          "version": "0.2.10"
        },
        "obsidian-another-quick-switcher": {
          "version": "10.0.0"
        },
        "obsidian-auto-link-title": {
          "version": "1.4.1"
        },
        "obsidian-banners": {
          "version": "1.3.3"
        },
        "obsidian-copy-block-link": {
          "version": "1.0.4"
        },
        "obsidian-custom-frames": {
          "version": "2.4.6"
        },
        "obsidian-excalidraw-plugin": {
          "version": "2.0.13"
        },
        "obsidian-git": {
          "version": "2.22.0"
        },
        "obsidian-hotkeys-for-specific-files": {
          "version": "1.4.0"
        },
        "obsidian-linter": {
          "version": "1.22.0"
        },
        "obsidian-list-callouts": {
          "version": "1.2.0"
        },
        "obsidian-local-images-plus": {
          "version": "0.15.9"
        },
        "obsidian-minimal-settings": {
          "version": "7.3.1"
        },
        "obsidian-outliner": {
          "version": "4.8.0"
        },
        "obsidian-pandoc": {
          "version": "0.4.1"
        },
        "obsidian-projects": {
          "version": "1.17.1"
        },
        "obsidian-style-settings": {
          "version": "1.0.7"
        },
        "obsidian-weread-plugin": {
          "version": "0.6.0"
        },
        "quickadd": {
          "version": "1.6.1"
        },
        "remotely-save": {
          "version": "0.3.25"
        },
        "tag-wrangler": {
          "version": "0.6.1"
        },
        "templater-obsidian": {
          "version": "1.18.3"
        }
      }
    },
    "vault": {
      "config": {
        "accentColor": "",
        "theme": "moonstone",
        "textFontFamily": "微软雅黑",
        "interfaceFontFamily": "微软雅黑",
        "cssTheme": "Minimal",
        "translucency": false,
        "nativeMenus": true,
        "showViewHeader": true,
        "baseFontSize": 16,
        "baseFontSizeAction": false,
        "enabledCssSnippets": [
          "custom"
        ],
        "spellcheck": false,
        "defaultViewMode": "source",
        "showFrontmatter": true,
        "showInlineTitle": false,
        "attachmentFolderPath": "assets",
        "vimMode": true,
        "newFileLocation": "folder",
        "livePreview": true,
        "userIgnoreFilters": [
          "_debug_remotely_save/",
          "logseq/bak/"
        ],
        "alwaysUpdateLinks": true,
        "newFileFolderPath": "pages",
        "showLineNumber": false,
        "pdfExportSettings": {
          "includeName": true,
          "pageSize": "Letter",
          "landscape": false,
          "margin": "0",
          "downscalePercent": 100
        },
        "propertiesInDocument": "visible",
        "showUnsupportedFiles": true,
        "promptDelete": false,
        "newLinkFormat": "shortest"
      }
    }
  },
  "plugin": {
    "settings": {
      "values": {
        "styleLists": true,
        "debug": false,
        "stickCursor": "never",
        "betterEnter": true,
        "betterTab": true,
        "selectAll": true,
        "listLines": false,
        "listLineAction": "toggle-folding",
        "dnd": true,
        "previousRelease": "4.7.1"
      }
    }
  }
}

Additional information

I am not sure I understand what you trying to say.
II think you have this problem

Does either of these variants produce the output you want?

- line 1
  - ```java
    code here
    ```

- line 1
  ```java
  code here
  ```

In my test vault these produce the following output:
image

And that is just as expected with the first presenting the code block in a sub-list, and the second at the same level as the text of the line.

PS! The original code of the OP seems to be:

- line1
	- ```java
	code here
	```

With tab characters, and not just spaces. And it does look funky (as the thread above also illustrates), especially in live preview.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.