Skip to content
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

Brackets in comments cause problems with "Try this" #235

Open
shingtaklam1324 opened this issue Nov 24, 2020 · 1 comment
Open

Brackets in comments cause problems with "Try this" #235

shingtaklam1324 opened this issue Nov 24, 2020 · 1 comment

Comments

@shingtaklam1324
Copy link

import tactic

example (X : Type) (p : X → Prop) : (∃ x, p x) ↔ ¬ (∀ x, ¬ p x) :=
begin
  library_search -- avoid smileys if you want to use "try this" :-)
end

example (X : Type) (p : X → Prop) : (∃ x, p x) ↔ ¬ (∀ x, ¬ p x) :=
begin
  library_search -- and frownies are even worse :-(
end

Clicking on the "Try this:" code doesn't work, because the system gets confused by the brackets (in the first case the comment is deleted apart from the bracket; in the second case end gets deleted too). In practice I guess one isn't going to write anything after library_search usually -- the only reason I ran into this was because I was documenting something for a beginner.


Originally opened by @kbuzzard as leanprover-community/mathlib3#5051

@bryangingechen
Copy link
Contributor

The relevant part of the code starts here, if anyone wants to take a crack at it: https://github.com/leanprover/vscode-lean/blob/master/src/tacticsuggestions.ts#L79

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants