Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/tests/interactive/test-cases/infoview_verso.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import Verso
import VersoManual

set_option doc.verso true

/-- This shows $`\forall n, n = n`
--^ $/lean/plainTermGoal
-/
theorem test0 : ∀ (n : Nat), n = n := by
intros
rfl

open Verso.Genre

-- Can we avoid using the Manual Genre here?
#doc (Manual) "Test for verso math elaboration" =>

This is a standard paragraph, see some *inline* text decorations.
--^ $/lean/plainTermGoal

Our previous theorem showed $`\forall n, n = n`, which is equivalent to
--^ $/lean/plainTermGoal

$$`
\forall n, n = n
--^ $/lean/plainTermGoal
`
16 changes: 16 additions & 0 deletions src/tests/interactive/test-cases/infoview_verso.lean.expected.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{"textDocument":
{"uri": "file:///src/tests/interactive/test-cases/infoview_verso.lean"},
"position": {"line": 5, "character": 17}}
null
{"textDocument":
{"uri": "file:///src/tests/interactive/test-cases/infoview_verso.lean"},
"position": {"line": 17, "character": 40}}
null
{"textDocument":
{"uri": "file:///src/tests/interactive/test-cases/infoview_verso.lean"},
"position": {"line": 20, "character": 30}}
null
{"textDocument":
{"uri": "file:///src/tests/interactive/test-cases/infoview_verso.lean"},
"position": {"line": 24, "character": 8}}
null
4 changes: 2 additions & 2 deletions src/verso/Verso/Doc/Elab.lean
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,13 @@ public meta def _root_.Lean.Doc.Syntax.code.expand : InlineExpander
@[inline_expander Lean.Doc.Syntax.inline_math]
public meta def _root_.Lean.Doc.Syntax.inline_math.expand : InlineExpander
| `(inline| \math code( $s )) =>
``(Inline.math MathMode.inline $s)
``(Inline.math MathMode.inline $(quote s.getString))
| _ => throwUnsupportedSyntax

@[inline_expander Lean.Doc.Syntax.display_math]
public meta def _root_.Lean.Doc.Syntax.display_math.expand : InlineExpander
| `(inline| \displaymath code( $s )) =>
``(Inline.math MathMode.display $s)
``(Inline.math MathMode.display $(quote s.getString))
| _ => throwUnsupportedSyntax


Expand Down