Giter Club home page Giter Club logo

atom-htmltidy's Introduction

Hi there, I'm Andreas

const AnWeber = {
    work: "Software Architect/ Engineer",
    home: "Oberbatzi",
    code: ["Typescript", "Javascript", "Java", "C#", "CSS", "html"],
    askMeAbout: ["kids", "programming topics", "find a solution"],
    technologies: {
        backEnd: ["Spring Boot", "NodeJS", ".Net"],
        frontEnd: ["vue", "preact", "angular", "winforms", "wpf"],
        build: ["esbuild", "webpack", "gradle", "Github Actions", "Argo Workflows", "jenkins", "msbuild"],
        devOps: ["kubernetes", "elk stack", "argo-cd", "helm", "docker", "keycloak"],
        databases: ["oracle", "mssql", "mongo"],
        misc: ["VSCode Extensions", "bpmn"]
    },
    architecture: ["Microservices", "Serverless Architecture"],
    currentFocus: "Uniting software from two decades",
    hobbies: ["Hiking", "Gaming", "Lego"],
    funFact: "There are only 10 kinds of people in the world: the people who understand binary numbers and the people who don't."
};
console.info(AnWeber);

Current projects

Stats

AnWeber's GitHub stats

Top Langs

atom-htmltidy's People

Contributors

anweber avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

andrearicci

atom-htmltidy's Issues

ENOENT error

it does not work I tried to format an HTML file and on startup, a popup displays enoent error.

xml formating

When I try to format xml i have this error

grammar text.xml is not supported

stop atom-htmltidy from saving file

I use Ctrl+ALt+1 to format a file. But the file is not marked as modified! Is atom-htmltidy automatically saving the file? I didn't ask for the file to be saved --- I only asked for it to be formatted.

Uncaught illegal access

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.10.2
Electron Version: 0.37.8
System: Mac OS X 10.12
Thrown From: atom-htmltidy package, v5.1.0

Stack Trace

Uncaught illegal access

At /Users/zpinner/.atom/packages/atom-htmltidy/lib/tidyWorker.js:100

undefined

Commands

Config

{
  "core": {}
}

Installed Packages

# User
atom-htmltidy, v5.1.0 (active)
atom-prettify, v0.1.3 (inactive)
color-picker, v2.2.2 (active)
linter, v1.11.16 (active)
linter-tidy, v2.2.0 (active)
pigments, v0.35.1 (active)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.44.0 (inactive)
base16-tomorrow-dark-theme, v1.1.0 (inactive)
base16-tomorrow-light-theme, v1.1.1 (inactive)
one-dark-ui, v1.5.0 (active)
one-light-ui, v1.5.0 (inactive)
one-dark-syntax, v1.3.0 (active)
one-light-syntax, v1.3.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.5.3 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.2 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.1 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.41.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.39.0 (active)
find-and-replace, v0.201.0 (inactive)
fuzzy-finder, v1.3.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (active)
grammar-selector, v0.48.1 (active)
image-view, v0.58.2 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v0.53.1 (active)
notifications, v0.65.0 (active)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.242.2 (active)
snippets, v1.0.2 (active)
spell-check, v0.67.1 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.0 (active)
symbols-view, v0.113.0 (active)
tabs, v0.100.2 (active)
timecop, v0.33.2 (active)
tree-view, v0.208.2 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.34.0 (active)
whitespace, v0.33.0 (active)
wrap-guide, v0.38.1 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.2 (active)
language-csharp, v0.12.1 (active)
language-css, v0.37.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.42.1 (active)
language-html, v0.45.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.23.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.2 (active)
language-less, v0.29.5 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.2 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (active)
language-ruby, v0.69.0 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.56.0 (active)
language-shellscript, v0.22.4 (active)
language-source, v0.9.0 (active)
language-sql, v0.23.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.9 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages

incorrectly wrapping list items

I have the following options:

{"input-xml" : true, "output-xml" : true, "indent" : true, "indent-with-tabs" : true, "wrap" : 0}

I have the following input:

<ul>
  <li><code>args4j:args4j:2.32</code></li>
</ul>

atom-htmltidy wraps that to:

    <ul>
        <li>
            <code>args4j:args4j:2.32</code>
        </li>
    </ul>

Why the newlines inside <li>? How do I get rid of them? <code> is an inline element --- there is no need for wrapping.

wraps <pre> content

I have XHTML5 content starting with:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html><html  lang="en-us"  xmlns="http://www.w3.org/1999/xhtml">
  <head>

Try as I might, I cannot stop atom-htmltidy from wrapping my <pre> tags. Here is my config:

{"input-xml" : true, "output-xml" : true, "indent" : true, "indent-with-tabs" : true, "wrap" : 0}

Here is sample input:

<figure>
  <pre> <kbd>munge-file --when now -v target-file.dat</kbd></pre>
</figure>

That gets changed to:

    <figure>
        <pre>

<kbd>munge-file --when now -v target-file.dat</kbd>
</pre>
    </figure>

Where are the newlines coming from?

Inline PHP

Hi there,

Inline PHP is being encoded on save, which breaks the code. i.e.

<a href="#" class="apply-<?php echo $id; ?>Apply</a> becomes <a href="#" class="apply-&lt;?php echo $item; ?&gt;">Apply</a>

Obviously, we can work around this - but it is a little frustrating to have to do so.

Thanks! :)

Uncaught Error: spawn EACCES

[Enter steps to reproduce below:]

  1. press control+alt+1

Atom Version: 1.3.1
System: Mac OS X 10.10.5
Thrown From: atom-htmltidy package, v1.5.0

Stack Trace

Uncaught Error: spawn EACCES

At internal/child_process.js:298

Error: spawn EACCES
    at exports._errnoException (util.js:837:11)
    at ChildProcess.spawn (internal/child_process.js:298:11)
    at Object.exports.spawn (child_process.js:351:9)
    at new TidyWorker (/Users/justinoneill/.atom/packages/atom-htmltidy/lib/tidywrapper.js:26:31)
    at tidy (/Users/justinoneill/.atom/packages/atom-htmltidy/lib/tidywrapper.js:75:16)
    at format (/Users/justinoneill/.atom/packages/atom-htmltidy/lib/init.js:98:9)
    at atom-workspace.<anonymous> (/Users/justinoneill/.atom/packages/atom-htmltidy/lib/init.js:80:5)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:536:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:359:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -3:38.3.0 core:backspace (atom-text-editor.editor.is-focused)
     -3:37.9.0 editor:newline (atom-text-editor.editor.is-focused)
     -3:37.6.0 core:paste (atom-text-editor.editor.is-focused)
     -3:36.7.0 editor:newline (atom-text-editor.editor.is-focused)
     -3:34 core:backspace (atom-text-editor.editor.is-focused)
     -3:33.4.0 editor:newline (atom-text-editor.editor.is-focused)
     -3:33.1.0 core:paste (atom-text-editor.editor.is-focused)
     -3:32.9.0 editor:newline (atom-text-editor.editor.is-focused)
     -3:30.6.0 core:backspace (atom-text-editor.editor.is-focused)
     -3:30.2.0 editor:newline (atom-text-editor.editor.is-focused)
     -3:29.8.0 core:paste (atom-text-editor.editor.is-focused)
     -3:29.5.0 editor:newline (atom-text-editor.editor.is-focused)
  2x -2:44.5.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:39.7.0 markdown-preview:toggle (atom-text-editor.editor.is-focused)
     -1:37.6.0 core:select-all (atom-text-editor.editor.is-focused)
     -0:00.6.0 atom-htmltidy:format (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "base16-tomorrow-dark-theme"
    ],
    "disabledPackages": [
      "language-jsx",
      "jshint",
      "jscs-fixer",
      "linter-jscs",
      "merge-conflicts"
    ],
    "ignoredNames": [
      ".git",
      ".gitignore",
      ".DS_Store",
      "._*",
      "Thumbs.db"
    ],
    "projectHome": "/Users/justinoneill/dev"
  }
}

Installed Packages

# User
atom-htmltidy, v1.5.0
atom-jade, v0.3.0
color-picker, v2.0.13
file-types, v0.5.1
language-jade, v0.6.2
language-javascript-jsx, v0.3.7
language-squarespace, v0.4.0
minimap, v4.16.0

# Dev
No dev packages

Failed to activate the atom-htmltidy package

Steps to reproduce:

  1. Open raw .html file in Atom. Can't provide my specific file for privacy reasons.
  2. Open Command Palette.
  3. Select atom-htmltidy.

Atom Version: 1.2.4
System: Mac OS X 10.11.1
Thrown From: atom-htmltidy package, v1.1.0

Stack Trace

Failed to activate the atom-htmltidy package

At unsupported execution platform

Error: unsupported execution platform
    at chooseExec (/Users/avk/.atom/packages/atom-htmltidy/lib/tidywrapper.js:149:13)
    at Object.<anonymous> (/Users/avk/.atom/packages/atom-htmltidy/lib/tidywrapper.js:22:16)
    at Module._compile (module.js:434:26)
    at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:190:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/avk/.atom/packages/atom-htmltidy/lib/init.js:9:20)
    at Module._compile (module.js:434:26)
    at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:190:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:661:34)
    at Package.module.exports.Package.activateConfig (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:188:14)
    at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:166:14)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:738:25
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:86:11)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:241:20)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:159:32)
    at CommandPaletteView.module.exports.SelectListView.confirmSelection (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
    at space-pen-div.atom.commands.add.core:confirm (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:533:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:356:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:99:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -0:12.1.0 core:select-all (atom-text-editor.editor.is-focused)
     -0:09.5.0 core:move-up (atom-text-editor.editor.is-focused)
     -0:06.5.0 core:select-all (atom-text-editor.editor.is-focused)
     -0:05.4.0 command-palette:toggle (atom-text-editor.editor.is-focused)
  3x -0:03.3.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -0:01.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:01.3.0 atom-htmltidy:format (atom-text-editor.editor)

Config

{
  "core": {
    "openEmptyEditorOnStart": false,
    "disabledPackages": [
      "whitespace"
    ],
    "themes": [
      "one-dark-ui",
      "base16-tomorrow-dark-theme"
    ]
  }
}

Installed Packages

# User
atom-htmltidy, v1.1.0
atom-jasmine, v0.8.1
copy-path, v0.2.1
file-icons, v1.6.12
html-entities, v0.4.0
jshint, v1.8.3
jsonlint, v1.1.2
language-babel, v2.5.2
language-haml, v0.23.7
language-rspec, v0.3.0
linter, v1.11.3
pigments, v0.19.1
react, v0.12.10
rspec-snippets, v0.4.0

# Dev
No dev packages

Uncaught illegal access - I can't even access the package to turn it off! Please make this stop.

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.12.7
Electron Version: 1.3.13
System: Mac OS X 10.11.6
Thrown From: atom-htmltidy package, v5.1.0

Stack Trace

Uncaught illegal access

At /Users/mariacam/.atom/packages/atom-htmltidy/lib/tidyWorker.js:100

undefined

Commands

     -7:49.5.0 autoclose-html:close-and-complete (atom-text-editor.editor.is-focused)
  2x -7:28.7.0 core:move-right (atom-text-editor.editor.is-focused)
     -7:11 autoclose-html:close-and-complete (atom-text-editor.editor.is-focused)
     -7:00.7.0 core:save (atom-text-editor.editor.is-focused)
  2x -6:12.8.0 editor:newline (atom-text-editor.editor.is-focused)
  2x -6:11.6.0 core:move-up (atom-text-editor.editor.is-focused)
     -6:02.2.0 editor:newline (atom-text-editor.editor.is-focused)
     -5:57.7.0 core:save (atom-text-editor.editor.is-focused)
  2x -5:28.4.0 core:backspace (atom-text-editor.editor.is-focused)
     -5:27.1.0 core:save (atom-text-editor.editor.is-focused.autocomplete-active)
     -2:28.6.0 core:copy (atom-text-editor.editor.is-focused)
     -2:26.8.0 emmet:insert-formatted-line-break-only (atom-text-editor.editor.is-focused)
     -2:26.8.0 editor:newline (atom-text-editor.editor.is-focused)
     -2:26.6.0 core:paste (atom-text-editor.editor.is-focused)
  3x -2:09.7.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
     -1:55.7.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "fast-eslint",
      "language-coffee-script",
      "lebab-convert",
      "atom-lebab"
    ],
    "packagesWithKeymapsDisabled": [
      "bracket-matcher"
    ],
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ]
  },
  "atom-htmltidy": {
    "formatOnSave": false
  }
}

Installed Packages

# User
api-docs, v0.0.6 (active)
atom-beautify, v0.29.16 (active)
atom-html-preview, v0.1.22 (active)
atom-htmltidy, v5.1.0 (active)
atom-jade, v0.3.0 (active)
atom-jshint, v2.0.0 (active)
atom-lebab, v0.0.0 (inactive)
atom-live-server, v1.2.5 (inactive)
atom-ternjs, v0.16.1 (active)
atomic-chrome, v0.0.0 (inactive)
autoclose-html, v0.23.0 (active)
autocomplete-html, v0.0.0 (inactive)
autocomplete-html-entities, v0.1.0 (active)
autocomplete-paths, v1.0.5 (active)
block-comment-lines, v0.2.4 (inactive)
comment, v0.5.0 (inactive)
comments-42, v1.3.0 (inactive)
emmet, v2.4.3 (active)
fast-eslint, v3.8.0 (inactive)
git-plus, v7.0.4 (active)
git-time-machine, v1.5.4 (inactive)
jade-beautify, v0.1.5 (active)
js-hint, v0.0.0 (inactive)
language-babel, v2.48.5 (active)
language-jade, v0.7.2 (active)
lebab, v0.10.0 (inactive)
lebab-convert, v0.9.0 (inactive)
linter, v1.11.18 (active)
linter-csslint, v1.3.3 (active)
linter-eslint, v8.0.0 (active)
linter-htmlhint, v1.3.1 (active)
linter-jshint, v3.0.2 (active)
linter-stylelint, v3.6.0 (active)
open-in-browsers, v0.0.19 (active)
pigments, v0.37.0 (active)
transpile, v0.1.4 (active)
transpile-decaf, v0.1.3 (active)
atom-dark-syntax, v0.27.0 (active)
atom-dark-ui, v0.52.0 (active)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.45.0 (inactive)
base16-tomorrow-dark-theme, v1.3.0 (inactive)
base16-tomorrow-light-theme, v1.3.0 (inactive)
one-dark-ui, v1.6.2 (inactive)
one-light-ui, v1.6.2 (inactive)
one-dark-syntax, v1.5.0 (inactive)
one-light-syntax, v1.5.0 (inactive)
solarized-dark-syntax, v1.0.5 (inactive)
solarized-light-syntax, v1.0.5 (inactive)
about, v1.7.0 (active)
archive-view, v0.62.0 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.13.1 (active)
autocomplete-html, v0.0.0 (inactive)
autocomplete-plus, v2.31.4 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.42.0 (active)
bracket-matcher, v0.82.2 (active)
command-palette, v0.39.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.40.0 (active)
find-and-replace, v0.202.2 (active)
fuzzy-finder, v1.4.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.2 (active)
image-view, v0.60.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.2 (inactive)
markdown-preview, v0.158.8 (active)
metrics, v1.1.2 (active)
notifications, v0.65.1 (active)
open-on-github, v1.2.1 (inactive)
package-generator, v1.0.1 (inactive)
settings-view, v0.243.1 (active)
snippets, v1.0.4 (active)
spell-check, v0.68.4 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.2 (active)
symbols-view, v0.113.1 (inactive)
tabs, v0.103.0 (active)
timecop, v0.33.2 (active)
tree-view, v0.210.0 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.35.1 (active)
whitespace, v0.35.0 (active)
wrap-guide, v0.38.2 (active)
language-c, v0.54.0 (active)
language-clojure, v0.22.1 (active)
language-coffee-script, v0.48.0 (inactive)
language-csharp, v0.13.0 (active)
language-css, v0.40.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.43.0 (active)
language-html, v0.47.1 (active)
language-hyperlink, v0.16.1 (active)
language-java, v0.24.0 (active)
language-javascript, v0.122.0 (active)
language-json, v0.18.3 (active)
language-less, v0.29.6 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.37.0 (active)
language-php, v0.37.3 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.1 (active)
language-ruby, v0.70.2 (active)
language-ruby-on-rails, v0.25.1 (active)
language-sass, v0.57.0 (active)
language-shellscript, v0.23.0 (active)
language-source, v0.9.0 (active)
language-sql, v0.25.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.29.1 (active)
language-toml, v0.18.1 (active)
language-xml, v0.34.12 (active)
language-yaml, v0.27.1 (active)

# Dev
No dev packages

TextEditor.get is deprecated.

TextEditor.prototype.displayBuffer has always been private, but now
it is gone. Reading the displayBuffer property now returns a reference
to the containing TextEditor, which now provides some of the API of
the defunct DisplayBuffer class.

TextEditor.get (/usr/share/atom/resources/app.asar/src/text-editor.js:101:14)
EditorHandler._setText (/home/jose/.atom/packages/atom-htmltidy/lib/editorHandler.js:198:75)
<unknown> (/home/jose/.atom/packages/atom-htmltidy/lib/editorHandler.js:130:22)
process._tickDomainCallback (internal/process/next_tick.js:129:7)

deletes file content on save

Hi,
I am running Atom 1.7.4 and atom-htmltidy 5.1.0.

When i save a php file an info window pops up with the message:
atom-htmltidy: tag count changed
1 tags missing.

and then the contents of the file is completely deleted.
I have tried uninstalling and reinstalling both atom and the atom-htmltidy package.
I also deleted the hidden atom directory in my home directory.

When saving .PHP files, deletes every line of code

Noticed this several months ago and stopped using Atom. Finally got around to testing this and found that htmltidy is involved in some way. With htmltidy installed and enabled, I open and edit a .php file. Upon saving the file the entire contents of the file is removed. All lines of code vanish. After disabling htmltidy the problem is no longer present. I have attached a pic of the message that appears in the upper right corner of Atom. Not sure if it helps or not. If you want more information, such as logs or debug data, just let me know how to access or enable the logs/debug and I'll send them to you.
screen shot 2017-03-03 at 11 05 07 am

Uncaught Error: This TextEditor has been destroyed

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.4.0
System: Mac OS X 10.11.2
Thrown From: atom-htmltidy package, v1.8.0

Stack Trace

Uncaught Error: This TextEditor has been destroyed

At /Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:790

Error: This TextEditor has been destroyed
    at DisplayBuffer.module.exports.DisplayBuffer.screenPositionForBufferPosition (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:790:15)
    at TextEditorMarker.module.exports.TextEditorMarker.getHeadScreenPosition (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-marker.js:179:33)
    at Cursor.module.exports.Cursor.getScreenPosition (/Applications/Atom.app/Contents/Resources/app.asar/src/cursor.js:73:26)
    at Cursor.module.exports.Cursor.getScreenRange (/Applications/Atom.app/Contents/Resources/app.asar/src/cursor.js:685:20)
    at Cursor.module.exports.Cursor.autoscroll (/Applications/Atom.app/Contents/Resources/app.asar/src/cursor.js:690:51)
    at Cursor.module.exports.Cursor.changePosition (/Applications/Atom.app/Contents/Resources/app.asar/src/cursor.js:675:21)
    at Cursor.module.exports.Cursor.setBufferPosition (/Applications/Atom.app/Contents/Resources/app.asar/src/cursor.js:80:19)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1415:23
    at TextEditor.module.exports.TextEditor.moveCursors (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1652:9)
    at TextEditor.module.exports.TextEditor.setCursorBufferPosition (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1414:19)
    at setText (/Users/jeff/.atom/packages/atom-htmltidy/lib/init.js:287:31)
    at OnFormatFinished (/Users/jeff/.atom/packages/atom-htmltidy/lib/init.js:141:9)
    at /Users/jeff/.atom/packages/atom-htmltidy/lib/init.js:102:2
    at TidyWorker.<anonymous> (/Users/jeff/.atom/packages/atom-htmltidy/lib/tidywrapper.js:85:5)
    at emitNone (events.js:67:13)
    at TidyWorker.emit (events.js:166:7)
    at ChildProcess.<anonymous> (/Users/jeff/.atom/packages/atom-htmltidy/lib/tidywrapper.js:60:10)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

Commands

     -3:03.7.0 core:undo (atom-text-editor.editor.is-focused)
     -3:02.2.0 core:save (atom-text-editor.editor.is-focused)
     -3:00.3.0 core:backspace (atom-text-editor.editor.is-focused)
     -2:59.4.0 core:save (atom-text-editor.editor.is-focused)
     -2:58.3.0 core:undo (atom-text-editor.editor.is-focused)
  2x -0:06.5.0 editor:newline (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "whitespace"
    ]
  },
  "atom-htmltidy": {}
}

Installed Packages

# User
atom-htmltidy, v1.8.0

# Dev
No dev packages

How to set default options?

I see there is a default config box, but is this supposed to be a file path or rules pasted directly in? Please advise of the format so I can use it. I tried pasting "indent":true" in the box and nothing happened.

Preserving Tags

Needs an option to Preserve tags. It keeps deleting this FontAwsome tag

i class="fa fa-arrow-up" aria-hidden="true" /i

. I have to add it back in notepad each time I want to commit my webpage to my GitHub. Is there any way to do this without disabling the format on save option?

no indents

after formatted my code by this plugin,indents are removed.
why why why
there are some config options in the documentation
but,how config this plugin?
in a config file?

atom Htmltidy

I was having problems with this package, when I want to save my files with "ctrl-s" trigger the package change my code and inject HTML code on the bottom of the document. please fix it.

TextEditor.displayBuffer is deprecated.

TextEditor.prototype.displayBuffer has always been private, but now
it is gone. Reading the displayBuffer property now returns a reference
to the containing TextEditor, which now provides some of the API of
the defunct DisplayBuffer class.

TextEditor.displayBuffer (<embedded>:2488:16)
EditorHandler._setText (C:\Users\Tommy Gooden\.atom\packages\atom-htmltidy\lib\editorHandler.js:198:76)
<unknown> (C:\Users\Tommy Gooden\.atom\packages\atom-htmltidy\lib\editorHandler.js:130:22)
<unknown> (null:null:null)
process._tickCallback (internal/process/next_tick.js:188:7)

Formats different file

I've created two new files (Untitled) and copy pasted some html there. I formatted one file and then tried to format another. Nothing happened with to the second file. However, the first file was reformatted as I noticed.

I tried to rename files but it didn't help. It only helped to close the first file. Then it started to format the second file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.