Comments (4)
Thanks for reporting this. This uncovers another case where Parinfer can corrupt strings.
The problem is that inserting a quote before ";"
gives "";"
, which is still a valid clojure expression, and Parinfer will operate on anything valid.
I'm not yet sure if this problem is solvable. But I have no doubt that the information fundamental to and necessary for solving it is related to quote-directionality. If we can capture the intended direction that these quotes are pointed, we may be able to come up with some rules for handling these intermediate states created by inserting or deleting quotes.
from parinfer.js.
There are two things that I think can help this case without introducing much complexity:
- a trapdoor to disable parinfer once odd number of quotes are found
- auto-closing strings to prevent trapdoor encounters
details here: https://github.com/shaunlebron/parinfer/wiki/The-Problem-with-Quotes
from parinfer.js.
this is fixed in the quotefix branch. see test cases here
I'm going to finish #63 before cutting a release
from parinfer.js.
@snoe: sorry, forgot to follow-up on this, but this has been fixed for the past few releases (at 1.4.0 now). Here's the demo of your case in atom-parinfer:
from parinfer.js.
Related Issues (20)
- multiple dedents from reformat HOT 1
- test multiple changes HOT 2
- redundant indentation HOT 1
- How to make multi-line maps HOT 3
- new plugin for a multi-user browser REPL (REPtiLe) HOT 1
- Bug in multi-line Raise operation HOT 4
- Parinfer Parens Mode bug HOT 5
- add dates to the CHANGELOG HOT 1
- minor doc change
- Namespaced map indentation doesn't agree with cljfmt HOT 5
- Disable graying out of ending parens HOT 1
- how to add indentation rules for custom forms? HOT 1
- evil-commentary don't work HOT 4
- support for comment characters other than semicolon HOT 1
- Align map values HOT 1
- Allow unbalanced brackets in symbols HOT 4
- Test optional returned values in markdown files
- How to support other Lisp dialects HOT 2
- Parlinter is archived, what to use instead? HOT 4
- Add closing quote? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parinfer.js.