Skip to content

Commit

Permalink
fix: de-nest tactics for the same location
Browse files Browse the repository at this point in the history
  • Loading branch information
david-christiansen committed Apr 30, 2024
1 parent ca41db6 commit 392171d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/highlighting/SubVerso/Highlighting/Code.lean
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,11 @@ def Output.addText (output : List Output) (str : String) : List Output :=
def Output.openSpan (output : List Output) (messages : Array (Highlighted.Span.Kind × String)) : List Output :=
.span messages :: output

def Output.openTactic (output : List Output) (info : Array (Highlighted.Goal Highlighted)) (pos : Nat) : List Output :=
.tactics info pos :: output
def Output.openTactic (output : List Output) (info : Array (Highlighted.Goal Highlighted)) (pos : Nat) : List Output := Id.run do
if let .tactics info' pos' :: output' := output then
if pos == pos' then
return .tactics (info ++ info') pos :: output'
return .tactics info pos :: output

def Output.inTacticState (output : List Output) (info : Array (Highlighted.Goal Highlighted)) : Bool :=
output.any fun
Expand Down

0 comments on commit 392171d

Please sign in to comment.