View Source Horizon.SimpleNginxFormatter (horizon v0.2.7)

Summary

Functions

Formats an nginx.conf-like string by

Functions

format(conf)

Formats an nginx.conf-like string by:

  • Indenting lines based on '{' and '}'.
  • Inserting a blank line before a line containing '{' unless the previous line is blank or a comment.
  • Inserting a blank line after a line containing '}' unless the next line is also a closing brace ('}').