adambutler / atom-prettify

Atom Package to prettify your HTML
MIT License
17 stars 5 forks source link

Failed to activate the atom-prettify package #7

Open mike opened 9 years ago

mike commented 9 years ago

[Enter steps to reproduce below:]

  1. Launch Atom

Atom Version: 0.191.0 :warning: in 1.0 API Preview Mode :warning: System: Mac OS X 10.10.3 Thrown From: atom-prettify package, v0.1.0

Stack Trace

Failed to activate the atom-prettify package

At Cannot read property 'command' of undefined

TypeError: Cannot read property 'command' of undefined
    at Object.module.exports.activate (/Users/toru/.atom/packages/atom-prettify/lib/prettify.coffee:10:32)
    at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app/src/package.js:222:19)
    at /Applications/Atom.app/Contents/Resources/app/src/package.js:203:30
    at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:147:15)
    at Package.module.exports.Package.activate (/Applications/Atom.app/Contents/Resources/app/src/package.js:195:14)
    at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:434:21)
    at /Applications/Atom.app/Contents/Resources/app/src/package-manager.js:418:29
    at Config.module.exports.Config.transact (/Applications/Atom.app/Contents/Resources/app/src/config.js:298:16)
    at PackageManager.module.exports.PackageManager.activatePackages (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:413:19)
    at PackageManager.module.exports.PackageManager.activate (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:394:46)

Commands

Config

{
  "core": {
    "disabledPackages": [
      "metrics",
      "highlight-selected",
      "exception-reporting",
      "feedback",
      "less-autocompile",
      "terminal",
      "language-mustache",
      "language-go",
      "language-c",
      "language-clojure",
      "language-toml"
    ]
  }
}

Installed Packages

# User
atom-color-highlight, v3.0.8
atom-html-preview, v0.1.6
atom-jshint, v1.5.0
atom-prettify, v0.1.0
color-picker, v1.6.0
dash, v1.1.0
language-mako, v0.4.0
linter, v0.12.0
linter-csslint, v0.0.11
linter-jshint, v0.1.2
linter-pylint, v0.2.1
minimap, v4.7.6
project-manager, v1.15.5
project-palette-finder, v2.4.16

# Dev
No dev packages
adambutler commented 9 years ago

@mike Can you confirm that the latest version 0.1.3 has no issues?

mike commented 9 years ago

@adambutler version 0.1.3 is not giving me any package errors!

But I tested prettifying a random snippet of html:

<div class="header"><h1>Title<small class="thin"> Small Text</small></h1></div>

and I got this partial prettification:

<div class="header">
    <h1>Title<small class="thin"> Small Text</small></h1></div>

However, if I change all the tags to divs, it works well:

<div class="header">
    <div>Title
        <div class="thin"> Small Text</div>
    </div>
</div>

Is this behavior expected?

(I'm running Atom 0.208.0 on OS X 10.10.3)

adambutler commented 9 years ago

I see... this is quite possibly an upstream issue for https://github.com/beautify-web/js-beautify. I will investigate this weekend.