New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add error markers #84
Conversation
src-cljs/atom_parinfer/core.cljs
Outdated
;; Error Markers | ||
;;------------------------------------------------------------------------------ | ||
|
||
(def error-marker-class "parinfer-error-marker") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this class be hashed like the other classnames in this extension?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I've been trying to match your idioms in this repo, but I think this is the first user-customizable class and I thought a hash might be unnecessary here and maybe jarring to users.
src-cljs/atom_parinfer/core.cljs
Outdated
(defn clear-error-markers | ||
[js-editor start-row end-row js-error] | ||
(doseq [marker (get-error-markers js-editor start-row end-row)] | ||
(swap! error-marker-ids disj (oget marker "id")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would prefer to not see swap!
inside a doseq
Can you make swap!
a single operation here?
345d205
to
cdc4561
Compare
Does the CSS require the |
i thought it was, but it's not. confirmed it |
Errors are now marked with
.parinfer-error-marker
. These error markers are cleared in the parent expression hack range when text is processed. If there is still an error, the marker is created again. Some enhancements can be made, but it works.