prettier / prettier/plugin-pug

Transform wrapping html tags to pug

Open
#26 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted type: enhancement
Dominant language
TypeScript
Stars
208
Forks
49
Avg merge
4h 26m
Merged PRs (30d)
8

Description

This
<!DOCTYPE html>
<html>

body
  p Indenting the body tag here would make no difference.
  <p>HTML itself isn't whitespace-sensitive.</p>
  ul
    li Item A
    li Item B
    li Item C
  <ul>
    <li>Item A</li>
    li Item B
    <li>Item C</li>
  </ul>

</html>
Should become this
doctype html
html

body
  p Indenting the body tag here would make no difference.
  p HTML itself isn't whitespace-sensitive.
  ul
    li Item A
    li Item B
    li Item C
  ul
    li Item A
    li Item B
    li Item C

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Use the mixed HTML/Pug example in the issue as the reproduction and compare the formatter's output with the requested Pug output. Locate the formatter entry point and its tests, then add coverage for converting wrapping HTML tags and the doctype; done means the example formats exactly as shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
pug, typescript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.