/haml-formatter

haml formatter written in typescript

Primary LanguageTypeScriptMIT LicenseMIT

Haml Formatter

Custom Custom circleci npmV min install githubLastCommit

Usage

import { FormatHaml } from 'haml-formatter';

const result = FormatHaml(
  `

.level
    .level-left
               %h1.title
      %i.fa.fa-map-marker

                .level
                .level-left
     %h1.title
                  %i.fa.fa-map-marker
                  
                  `
);

Result

.level
    .level-left
        %h1.title
    %i.fa.fa-map-marker

        .level
            .level-left
    %h1.title
        %i.fa.fa-map-marker

Docs

index

Options
interface Options {
    tabSize: number;
    insertSpaces: boolean;
}
FormatHaml
function FormatHaml(text: string, options?: Partial<Options>): string;

Generated with suf-cli

License

Copyright (c) 2019 Leonard Grosoli Licensed under the MIT license.