miracleblue / autoclose-tags Goto Github PK
View Code? Open in Web Editor NEWThis project forked from awaw00/autoclose
Close HTML-like tags in Atom automatically! Now with 15% extra laziness.
License: MIT License
This project forked from awaw00/autoclose
Close HTML-like tags in Atom automatically! Now with 15% extra laziness.
License: MIT License
When an html open tag is completed the related closing tag is added twice.
<WebView Url="http:/>"/>
It's a bad scene :(
Of course this is expected behaviour, but not really wanted.
So maybe the tag closing functionality shouldn't be triggered when the closing bracket is surrounded by single or double quotes or is preceded by one single or double quote.
When you use an arrow function
e.g.
(someVar) => { }
when you type the '>' character in the arrow function declaration, the autoclose-tags library seems to pick this up as an element and will generate a closing tag which should not happen.
My specific example where this was witnessed:
<button onClick={ () => this.onDismiss(item.objectID) } type="button">Dismiss
Versions:
Windows 10 Home x64
Atom: 1.15.0
autoclose-tags: 0.2.1
When I create an opening tag in html, two closing tags are created instead of one.
Edit: this happened because I had another autoclose package installed that had not disabled itself.
[Enter steps to reproduce:]
Atom: 1.27.1 x64
Electron: 1.7.15
OS: Microsoft Windows 10 Enterprise
Thrown From: autoclose-tags package 0.2.2
Uncaught TypeError: this.action.disposalAction is not a function
At C:\Users\Admin\.atom\packages\autoclose-tags\lib\autoclose.coffee:39
TypeError: this.action.disposalAction is not a function
at Object._paneItemChanged (/packages/autoclose-tags/lib/autoclose.coffee:39:29)
at /packages/autoclose-tags/lib/autoclose.coffee:26:8
at Function.module.exports.Emitter.simpleDispatch (~/AppData/Local/atom/app-1.27.1/resources/app/node_modules/event-kit/lib/emitter.js:27:20)
at Emitter.module.exports.Emitter.emit (~/AppData/Local/atom/app-1.27.1/resources/app/node_modules/event-kit/lib/emitter.js:156:34)
at Workspace.didActivatePaneContainer (~/AppData/Local/atom/app-1.27.1/resources/app/src/workspace.js:430:26)
at Dock.subscriptions.CompositeDisposable.paneContainer.onDidActivatePane (~/AppData/Local/atom/app-1.27.1/resources/app/src/dock.js:62:20)
at Function.module.exports.Emitter.simpleDispatch (~/AppData/Local/atom/app-1.27.1/resources/app/node_modules/event-kit/lib/emitter.js:27:20)
at Emitter.module.exports.Emitter.emit (~/AppData/Local/atom/app-1.27.1/resources/app/node_modules/event-kit/lib/emitter.js:156:34)
at PaneContainer.didActivatePane (~/AppData/Local/atom/app-1.27.1/resources/app/src/pane-container.js:265:24)
at Pane.activate (~/AppData/Local/atom/app-1.27.1/resources/app/src/pane.js:1018:46)
at Pane.focus (~/AppData/Local/atom/app-1.27.1/resources/app/src/pane.js:401:23)
at HTMLElement.handleFocus (/app.asar/src/pane-element.js:41:20)
autoclose-tags 0.2.2
esformatter 2.3.0
jade-beautify 0.1.5
nuclide 0.271.0
pigments 0.40.2
react-es6-snippets 0.3.0
react-native-snippets 0.3.0
react-native-snippets-horse 2.0.0
react-snippets 1.0.1
When I type >
, a closing tag </div>
is inserted automatically.
And then I type Enter
key, the text is as below:
<div>
[I]
</div>
โป [I]
is the cursor.
At this time, a 2 spaces indent is expected, but 4 spaces are inserted actually.
My environment:
OS: macOS High Sierra
Atom: 1.26.1
This bug may not occur before. (I'm not too sure.)
It may occur at only newer Atom.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.