akalongman / sublimetext-codeformatter

Code Formatter plugin for ST2/ST3
MIT License
772 stars 130 forks source link

Format error when format html #409

Closed wellsemon closed 4 years ago

wellsemon commented 4 years ago

Sublime text Version 3.2.2 Build 3211 I got the error after formatted html EN0YnqZPbF

wellsemon commented 4 years ago

resolved it

steps

  1. go to preferences - browse packages - CodeFormatter\codeformatter,
  2. open htmlformatter.py with text editor
  3. modify content in line 76 and final result is in below
    # stdout = soup.prettify(formatter=None, indent_size=p_indent_size)
    stdout = soup.prettify()

reason

prettify does not support indent_size argument

def prettify(self, encoding=None, formatter="minimal"):