File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ Author: Joachim Breitner
66
77import VersoManual
88import Manual.Meta.Figure
9- import Lean.Elab.InfoTree.Types
9+ import Lean.Elab.InfoTree
1010
1111open Verso Doc Elab
1212open Verso.Genre Manual
@@ -30,7 +30,12 @@ def Block.noVale.descr : BlockDescr where
3030
3131@[part_command Lean.Doc.Syntax.codeblock]
3232def markdown : PartCommand
33- | `(Lean.Doc.Syntax.codeblock| ``` markdown | $txt ``` ) => do
33+ | `(Lean.Doc.Syntax.codeblock| ``` $markdown:ident $args*| $txt ``` ) => do
34+ let x <- Lean.Elab.realizeGlobalConstNoOverloadWithInfo markdown
35+ if x != (by exact decl_name%) then Elab.throwUnsupportedSyntax
36+ for arg in args do
37+ let h <- MessageData.hint m!"Remove it" #["" ] (ref? := arg)
38+ logErrorAt arg m!"No arguments expected{h}"
3439 let some ast := MD4Lean.parse txt.getString
3540 | throwError "Failed to parse body of markdown code block"
3641 let mut currentHeaderLevels : Markdown.HeaderMapping := default
You can’t perform that action at this time.
0 commit comments