Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


Quelle  VersoRoles.lean   Sprache: Lean

 

/-
Copyright (c) 2026 Lean FRO LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: David Thrane Christiansen
-/


import Mathlib.Util.VersoRoles
import Lean.Elab.GuardMsgs
import Mathlib.Tactic.Simps

/-! # Tests for Mathlib's custom Verso docstring roles. -/

library_note «migration role test» /-- A note used to test the `library_note` role. -/

-- The `{url}` role renders a link without emitting diagnostics.
#guard_msgs in
set_option doc.verso true in
/-- See {url}`https://leanprover.org`. -/
def urlTest : Nat := 0

-- More complicated syntax involving brackets and spaces is allowed.
#guard_msgs in
set_option doc.verso true in
/-- See {url}[ `https://leanprover.org` ]. -/
def urlBracketsTest : Nat := 0

-- Also newlines are allowed.
#guard_msgs in
set_option doc.verso true in
/-- See {url}[
`https://leanprover.org`
   ]. -/

def urlNewlineTest : Nat := 0

-- The `{library_note}` role accepts a known label without emitting diagnostics.
#guard_msgs in
set_option doc.verso true in
/-- See {library_note}`migration role test`. -/
def libraryNoteTest : Nat := 0

-- The `{library_note}` role works for imported library notes.
#guard_msgs in
set_option doc.verso true in
/-- See {library_note}`custom simps projection`. -/
def libraryNoteImportedTest : Nat := 0

-- The `{library_note}` role warns on an unknown label, hinting at typos but
-- allowing forward references.
/--
warning: No library note with label `does not exist`.

Note: This warning can be disabled with `set_option doc.verso.libraryNote.warnOnMissing false`.
-/

#guard_msgs in
set_option doc.verso true in
/-- See {library_note}`does not exist`. -/
def libraryNoteFailTest : Nat := 0

-- Check that we can disable the warning message.
#guard_msgs in
set_option doc.verso true in
set_option doc.verso.libraryNote.warnOnMissing false in
/-- See {library_note}`does not exist`. -/
def libraryNoteSilenceTest : Nat := 0

-- The `{cite}` role accepts a key present in `docs/references.bib` without emitting diagnostics.
#guard_msgs in
set_option doc.verso true in
/-- See {cite "Adamek_Rosicky_1994"}[Adámek–Rosický]. -/
def citeTest : Nat := 0

-- The `{cite}` role warns on a key absent from `docs/references.bib`.
/-- warning: No bibliography entry `NotARealKey` in `docs/references.bib`. -/
#guard_msgs in
set_option doc.verso true in
/-- See {cite "NotARealKey"}[text]. -/
def citeFailTest : Nat := 0

-- The `code` code block records its language and renders verbatim, without diagnostics.
#guard_msgs in
set_option doc.verso true in
/--
```code python
print("hi")
```
-/

def codeTest : Nat := 0

Messung
CHZG
9410010097

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,077
#Domains=862,101