Glavin001 / atom-beautify

:mega: Help Wanted - Looking for Maintainer: https://github.com/Glavin001/atom-beautify/issues/2572 | :lipstick: Universal beautification package for Atom editor (:warning: Currently migrating to https://github.com/Unibeautify/ and have very limited bandwidth for Atom-Beautify Issues. Thank you for your patience and understanding :heart: )
http://unibeautify.com/
MIT License
1.49k stars 454 forks source link

Add Support for Vapor Leaf (HTML Templating) #2135

Open marc-medley opened 6 years ago

marc-medley commented 6 years ago

Description

Add Support for Vapor Leaf (HTML Templating).

Vapor Leaf Documentation: https://docs.vapor.codes/3.0/leaf/overview/

Leaf is HTML plus a relatively small set of template patterns.

Simply formatting the HTML without particular formatting of the template parts could be helpful.

Input Before Beautification

Any .leaf file.

Here is a link to several example .leaf files in the raywenderlich/vapor-til github example project

Expected Output

The beautified code should look like this:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>#(title) | Acronyms</title>
</head>
<body>
  <h1>Acronyms</h1>

  #if(acronyms) {
    <table>
      <thead>
        <tr>
          <th>
            Short
          </th>
          <th>
            Long
          </th>
        </tr>
      </thead>
      <tbody>
        #for(acronym in acronyms) {
          <tr><td><a href="/acronyms/#(acronym.id)">#(acronym.short)</a></td><td>#(acronym.long)</td></tr>
        }
      </tbody>
    </table>
  } else {
    <h2>There aren't any acronyms yet!</h2>
  }
</body>
</html>

Actual Output

Attempted runs of :

Atom Beautify could not find a supported beautifier for this file

Atom Beautify could not determine a supported beautifier to handle this file with grammar "HTML (Leaf)" and extension "leaf". If you would like to request support for this file and its language, please create an issue for Atom Beautify at https://github.com/Glavin001/atom-beautify/issues

Steps to Reproduce

  1. Open a .leaf file.
  2. Run Atom Beautify.
  3. The error message pops up.

Debug

Here is a link to several example .leaf files in the raywenderlich/vapor-til github example project

Checklist

I have:

ghost commented 6 years ago

Please follow the issue template provided. More specifically, update the original comment for this issue by adding a link to the required debug.md gist which includes debugging information that answers our most commonly asked questions. Thank you.

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please add a comment. It will be closed if no further activity occurs. Thank you for your contributions.

marc-medley commented 6 years ago

Support for Vapor Leaf (HTML Templating) has yet to be added to atom-beautify.

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please add a comment. It will be closed if no further activity occurs. Thank you for your contributions.

marc-medley commented 6 years ago

Leaf 3.0.1 have been released. Support for Vapor Leaf (HTML Templating) has yet to be added to atom-beautify.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please add a comment. It will be closed if no further activity occurs. Thank you for your contributions.

marc-medley commented 5 years ago

Leaf 3.0.2 has been released.

Support for Vapor Leaf (HTML Templating) has not yet to be added to atom-beautify.

Leaf Syntax Overview is provivded at https://docs.vapor.codes/3.0/leaf/overview/.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please add a comment. It will be closed if no further activity occurs. Thank you for your contributions.

marc-medley commented 5 years ago

Support for Vapor Leaf (HTML Templating) has yet to be added to atom-beautify.

prettydiff commented 5 years ago

I am working on the next major update of my parser. Once complete I anticipate the work to add support for Vapor Leaf will take only a few hours. Help is needed though to update Unibeautify (Atom Beautify's successor) to support the current (newer) major version of Pretty Diff

https://github.com/Unibeautify/beautifier-prettydiff/issues/114

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please add a comment. It will be closed if no further activity occurs. Thank you for your contributions.

marc-medley commented 5 years ago

Support for Vapor Leaf (HTML Templating) has yet to be added to atom-beautify.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please add a comment. It will be closed if no further activity occurs. Thank you for your contributions.

prettydiff commented 5 years ago

I just added Vapor Leaf to Pretty Diff.

prettydiff commented 5 years ago

The latest version of Pretty Diff is about to be merged into Unibeautify (Atom Beautify's successor), so this is just around the corner. In the mean time you can test support at http://prettydiff.com?mode=beautify&language=vapor and let me know if you find any defects. You can report any issues to me directly at https://github.com/prettydiff/prettydiff/issues