Search code examples
visual-studio-codemarkdown

Indentation difference in code block of Markdown Preview Enhanced


I found that the indentation in code block is different between editor (VS Code) and Markdown Preview Enhanced (so does the highlighting):

enter image description here

Would there be a way of adjusting the indentation to the same as in the editor's?


Solution

  • Just change the font of markdown preview enhanced code block by the following steps:

    1. cmd+shift+p
    2. type in markdown preview enhanced: customize css
    3. it will open a file and add
      html body code {
          font-family: 'Droid Sans Mono', monospace;
      }
      
      to the last of it, looks like this: enter image description here