Skip to content

Beautify HTML in .md-files #1729

@wottpal

Description

@wottpal

Description

I use Jekyll as a static-site-generator and often HTML-code in included in my .md-files. I want to auto-indent the HTMl but neither Atoms Auto-Indent function nor atom-beautify seems to work for that..

Input Before Beautification

---
layout: default
permalink: /test.html
title: Test-Site
---

<div>
<div>
</div>
<p>
</p>
</div>

Expected Output

---
layout: default
permalink: /test.html
title: Test-Site
---

<div>
  <div>
  </div>
  <p>
  </p>
</div>

Actual Output

---
layout: default
permalink: /test.html
title: Test-Site
---

<div>
  <div>
</div>
  <p>
</p>
</div>

Steps to Reproduce

  1. Add code to Atom editor
  2. Run command Atom Beautify: Beautify Editor
  3. This beautified code does not look right!

Debug

Here is a link to the debug.md Gist: https://gist.github.com/dkerzig/17ce01d9e44acf1c7719f89ca6eb5bf5

Thanks in advance!
Dennis

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions