Indent under header doesn't create code block

Brian, through trial and error I’ve put together this snippet:

  • it parses indented bullets as normal text
  • downside: code blocks are also parsed as normal text
  • bullet lists which start with an indented bullet are not recognized as bullet lists, i.e. you can’t fold the children. But you can fold from the header.

YMMV, I’m not using this snippet myself due to above shortcomings, but instead got used to not indenting bullets.

Maybe someone else has ideas how to improve the snippet.

Edit: might be interesting for you: @mat_rhein @Dor @Peanut @fierce_ninja




/*---- MAKE CODE LOOK NORMAL ----*/


/* EDITOR */
.cm-hmd-indented-code {
    color: var(--text-normal) !important;
    font: var(--text) !important;
}


/* PREVIEW */
.markdown-preview-view pre {
    color: var(--text-normal) !important;
    font: var(--text) !important;
    padding: var(--text) !important;
    background-color: var(--text) !important;
}
.markdown-preview-view code {
    color: var(--text-normal) !important;
    font: var(--text) !important;
    padding: var(--text) !important;
    background-color: var(--text) !important;
}

/* THIS IS APPARENTLY NOT NEEDED */
/.markdown-preview-view pre code {
/    color: var(--text-normal) !important;
/    font: var(--text) !important;
/}

obsidian default parse code as normal text.css (709 Bytes)

2 Likes