Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
243 commits
Select commit Hold shift + click to select a range
74f725d
feat: components in blog genre (#385)
david-christiansen May 8, 2025
e9bfdea
chore: bump dependencies for nightly-2025-05-08 (#386)
david-christiansen May 8, 2025
b84b44c
feat: upstream table from reference manual (#387)
david-christiansen May 9, 2025
ae75e7c
feat: generate directives for block components (#388)
david-christiansen May 9, 2025
9abbbd3
chore: document and partially enforce new procedures (#381)
david-christiansen May 8, 2025
bed7ef0
chore: bump to latest SubVerso and Lean nightly (#390)
david-christiansen May 13, 2025
2dbcc19
fix: use correct internal name for table block (#391)
david-christiansen May 13, 2025
ff98b5d
fix: allow list item contents to be on new line (#392)
david-christiansen May 13, 2025
8ecbcf1
fix: behavior of SVG tags inside the HTML (#393)
algebraic-dev May 14, 2025
0640f56
feat: manual genre can display Lean code from external projects (#394)
david-christiansen May 14, 2025
043463a
feat: allow namespace suppression when extracting external code (#395)
david-christiansen May 14, 2025
2a9cb61
chore: remove redundant error mods (#397)
david-christiansen May 15, 2025
fd08088
feat: use upstream hints infrastructure in errors (#398)
david-christiansen May 19, 2025
e6e76b8
chore: bump to nightly-2025-05-19 (#399)
david-christiansen May 19, 2025
40ce546
feat: alternative approach to incrementality (#400)
david-christiansen May 21, 2025
3139a69
feat: generalize external Lean code display (#401)
david-christiansen May 21, 2025
2b6f771
fix: also generate document when text is empty (#402)
david-christiansen May 22, 2025
67226e3
feat: bundle KaTeX and include by default in manual genre (#403)
david-christiansen May 23, 2025
fa999d4
fix: external code rebuilds and hints (#404)
david-christiansen May 23, 2025
4683bef
feat: suggest code samples based on string contents (#405)
david-christiansen May 27, 2025
1bc3b92
feat: document elaboration hooks (#406)
david-christiansen May 27, 2025
492b919
chore: bump toolchain to nightly-2025-05-27
kim-em May 28, 2025
0325484
fix: default anchor suggestions to false (#407)
david-christiansen May 28, 2025
950a1c5
fix: more reliable external module extraction (#408)
david-christiansen May 28, 2025
a8af964
fix: incorporate SubVerso improvements to error/tactic spans (#409)
david-christiansen May 29, 2025
136f897
chore: bump to 2025-06-01 (#413)
david-christiansen Jun 2, 2025
63a83d9
chore: bump to 2025-06-05 (#423)
david-christiansen Jun 5, 2025
9447236
Merge remote-tracking branch 'upstream/main' into nightly-testing
david-christiansen Jun 5, 2025
df6ff8e
feat: show hovers on closing delimiters (#428)
david-christiansen Jun 10, 2025
9849330
chore: bump to 2025-06-09
david-christiansen Jun 10, 2025
9dccd5b
chore: bump nightly-testing to 2025 06 20 and merge main (#447)
david-christiansen Jun 20, 2025
4ccf296
chore: bump to nightly-2025-06-23 and merge `main` (#452)
david-christiansen Jun 23, 2025
80a0d45
chore: bump nightly testing to 2025-06-24 and merge main (#455)
david-christiansen Jun 25, 2025
b5a40e6
chore: merge main into nightly-testing
github-actions[bot] Jun 26, 2025
f508c4d
chore: bump to nightly nightly-2025-06-26
github-actions[bot] Jun 26, 2025
b61da56
chore: bump to nightly nightly-2025-06-27
github-actions[bot] Jun 27, 2025
9cb5e1c
chore: bump to nightly nightly-2025-06-28
github-actions[bot] Jun 28, 2025
9971a71
chore: bump to nightly nightly-2025-06-29
github-actions[bot] Jun 29, 2025
eca90f1
chore: delete file that shouldn't have been committed
david-christiansen Jun 30, 2025
a362a2e
chore: merge main into nightly-testing
github-actions[bot] Jun 30, 2025
6218e55
chore: bump to nightly nightly-2025-06-30
github-actions[bot] Jun 30, 2025
24694c2
chore: merge main into nightly-testing
github-actions[bot] Jun 30, 2025
65a1348
chore: merge main into nightly-testing
github-actions[bot] Jul 1, 2025
adb84ec
chore: merge main into nightly-testing
github-actions[bot] Jul 3, 2025
db0b75a
chore: merge main into nightly-testing
github-actions[bot] Jul 4, 2025
9fcf7d8
chore: merge main into nightly-testing
github-actions[bot] Jul 4, 2025
b90b1f5
chore: bump to nightly-2025-07-04 (#468)
david-christiansen Jul 4, 2025
8440af2
chore: bump to nightly nightly-2025-07-05
github-actions[bot] Jul 5, 2025
a886817
chore: bump to nightly nightly-2025-07-06
github-actions[bot] Jul 6, 2025
0416a91
chore: bump to nightly nightly-2025-07-07
github-actions[bot] Jul 7, 2025
c486545
chore: bump to nightly nightly-2025-07-08
github-actions[bot] Jul 8, 2025
8bd2edc
chore: bump to nightly nightly-2025-07-09
github-actions[bot] Jul 9, 2025
4d78bfd
chore: bump to nightly nightly-2025-07-10
github-actions[bot] Jul 10, 2025
f3f417e
chore: bump to nightly nightly-2025-07-11
github-actions[bot] Jul 11, 2025
b8dce7f
chore: bump to nightly nightly-2025-07-12
github-actions[bot] Jul 12, 2025
a74c35c
chore: bump to nightly nightly-2025-07-13
github-actions[bot] Jul 13, 2025
02373d3
chore: bump to nightly-2025-07-19 (#470)
david-christiansen Jul 21, 2025
9cd6bd6
chore: merge main into nightly-testing
github-actions[bot] Jul 21, 2025
ada932d
chore: bump to nightly nightly-2025-07-21
github-actions[bot] Jul 21, 2025
3fdbc5c
chore: bump to nightly-2025-07-22 (#473)
david-christiansen Jul 22, 2025
0131acc
chore: merge main into nightly-testing
github-actions[bot] Jul 23, 2025
a3b5150
chore: merge main into nightly-testing
github-actions[bot] Jul 24, 2025
ed133a0
chore: bump to nightly nightly-2025-07-24
github-actions[bot] Jul 24, 2025
1e4bbba
chore: bump to nightly nightly-2025-07-25
github-actions[bot] Jul 25, 2025
29d6c48
chore: bump to nightly-2025-07-27 (#481)
david-christiansen Jul 28, 2025
3e7365d
chore: merge main into nightly-testing
github-actions[bot] Jul 28, 2025
689a5ba
chore: bump to nightly nightly-2025-07-28
github-actions[bot] Jul 28, 2025
dec08c7
chore: merge main into nightly-testing
github-actions[bot] Jul 29, 2025
a8cbc7e
chore: bump to nightly nightly-2025-07-29
github-actions[bot] Jul 29, 2025
89258d5
fix: make go-to-def work with latest nightly (#483)
david-christiansen Jul 29, 2025
ce563c6
chore: merge main into nightly-testing
github-actions[bot] Jul 29, 2025
2fa183b
chore: bump to nightly nightly-2025-07-30
github-actions[bot] Jul 30, 2025
0c69d2b
chore: merge main into nightly-testing
github-actions[bot] Jul 30, 2025
73f65a6
chore: merge main into nightly-testing
github-actions[bot] Jul 30, 2025
be129f7
chore: bump to nightly nightly-2025-07-31
github-actions[bot] Jul 31, 2025
1e004d1
chore: merge main into nightly-testing
github-actions[bot] Aug 1, 2025
4fc4cb6
chore: merge main into nightly-testing
github-actions[bot] Aug 1, 2025
0c00a34
chore: merge main into nightly-testing
github-actions[bot] Aug 2, 2025
6005cd6
chore: merge main into nightly-testing
github-actions[bot] Aug 4, 2025
8c51a3f
chore: bump to nightly-2025-08-04 (#491)
david-christiansen Aug 4, 2025
87d71bf
chore: merge main into nightly-testing
github-actions[bot] Aug 5, 2025
8f39675
chore: bump to nightly nightly-2025-08-05
github-actions[bot] Aug 5, 2025
50bacc1
chore: merge main into nightly-testing
github-actions[bot] Aug 5, 2025
d592526
chore: merge main into nightly-testing
github-actions[bot] Aug 7, 2025
9a26339
chore: bump to nightly-2025-08-07 (#496)
david-christiansen Aug 7, 2025
7d78c34
chore: switch back to main md4lean (#497)
david-christiansen Aug 7, 2025
3b2d25c
chore: bump to nightly nightly-2025-08-08
github-actions[bot] Aug 8, 2025
bd4c863
chore: bump to nightly nightly-2025-08-10
github-actions[bot] Aug 10, 2025
3a33a08
chore: bump to nightly nightly-2025-08-11
github-actions[bot] Aug 11, 2025
c285ac4
chore: bump to nightly nightly-2025-08-12
github-actions[bot] Aug 12, 2025
f1597c5
chore: bump to nightly nightly-2025-08-13
github-actions[bot] Aug 13, 2025
97e1382
chore: merge main into nightly-testing
github-actions[bot] Aug 14, 2025
ceb584a
chore: bump to 2025-08-14 (#506)
david-christiansen Aug 15, 2025
ed637d4
chore: bump to nightly nightly-2025-08-16
github-actions[bot] Aug 16, 2025
210ec6d
chore: bump to nightly nightly-2025-08-17
github-actions[bot] Aug 17, 2025
cd647c5
chore: merge main into nightly-testing
github-actions[bot] Aug 18, 2025
ce6f7f1
chore: bump to nightly nightly-2025-08-18
github-actions[bot] Aug 18, 2025
98f06d2
chore: bump to nightly nightly-2025-08-19
github-actions[bot] Aug 19, 2025
a2bb617
chore: merge main into nightly-testing
github-actions[bot] Aug 20, 2025
381b71c
chore: bump to nightly nightly-2025-08-20
github-actions[bot] Aug 20, 2025
5eac1a9
chore: merge main into nightly-testing
github-actions[bot] Aug 21, 2025
de51a72
chore: bump to nightly nightly-2025-08-21
github-actions[bot] Aug 21, 2025
3158dd1
chore: merge main into nightly-testing
github-actions[bot] Aug 22, 2025
a169f71
chore: merge main into nightly-testing
github-actions[bot] Aug 22, 2025
dc1ceef
chore: merge main into nightly-testing
github-actions[bot] Aug 23, 2025
590eac5
chore: merge main into nightly-testing
github-actions[bot] Aug 26, 2025
5da516f
chore: bump to nightly-2025-09-07 (#521)
david-christiansen Sep 8, 2025
14de028
chore: bump to nightly nightly-2025-09-08
github-actions[bot] Sep 8, 2025
7f122fa
chore: bump to nightly nightly-2025-09-09
github-actions[bot] Sep 9, 2025
6754f65
chore: merge main into nightly-testing
github-actions[bot] Sep 10, 2025
4006156
chore: bump to nightly nightly-2025-09-10
github-actions[bot] Sep 10, 2025
dd39e3c
chore: merge main into nightly-testing
github-actions[bot] Sep 15, 2025
5f580c3
chore: update to 2025-09-14 (#524)
david-christiansen Sep 15, 2025
596df01
chore: use same representation as upstream for documents (#525)
david-christiansen Sep 15, 2025
f5667cb
chore: merge main into nightly-testing
github-actions[bot] Sep 15, 2025
8f44bf6
chore: bump to nightly nightly-2025-09-15
github-actions[bot] Sep 15, 2025
b4a422d
fix: ambiguous identifier issues (#528)
david-christiansen Sep 15, 2025
5e33b04
chore: merge main into nightly-testing
github-actions[bot] Sep 15, 2025
4152ace
chore: merge main into nightly-testing
github-actions[bot] Sep 15, 2025
b327918
chore: bump to nightly nightly-2025-09-16
github-actions[bot] Sep 16, 2025
291ee01
chore: bump to nightly nightly-2025-09-17
github-actions[bot] Sep 17, 2025
dc11605
chore: merge main into nightly-testing
github-actions[bot] Sep 19, 2025
c0eca6e
chore: merge main into nightly-testing
github-actions[bot] Sep 21, 2025
32a192e
chore: bump to nightly-2025-09-20 (#533)
david-christiansen Sep 21, 2025
ad473af
chore: bump to nightly nightly-2025-09-21
github-actions[bot] Sep 21, 2025
606a92f
chore: bump to nightly nightly-2025-09-22
github-actions[bot] Sep 22, 2025
af91346
chore: bump to nightly nightly-2025-09-23
github-actions[bot] Sep 23, 2025
24882a1
chore: bump to nightly nightly-2025-09-24
github-actions[bot] Sep 24, 2025
582f88b
feat: export Lean to HTML (#537)
david-christiansen Sep 28, 2025
9bcfb48
chore: bump to nightly nightly-2025-09-29
github-actions[bot] Sep 29, 2025
ea15013
chore: bump to nightly nightly-2025-09-30
github-actions[bot] Sep 30, 2025
0376dde
chore: merge main into nightly-testing
github-actions[bot] Sep 30, 2025
3553695
chore: bump to nightly nightly-2025-10-01
github-actions[bot] Oct 1, 2025
01629be
chore: merge main into nightly-testing
github-actions[bot] Oct 1, 2025
370bdc7
chore: migrate some docstrings to verso (#547)
jcreedcmu Oct 1, 2025
5f4456a
chore: bump to nightly-2025-10-02 (#548)
david-christiansen Oct 3, 2025
9fb4935
chore: bump to nightly nightly-2025-10-03
github-actions[bot] Oct 3, 2025
7c743cc
chore: bump to nightly nightly-2025-10-05
github-actions[bot] Oct 5, 2025
16008ff
chore: merge main into nightly-testing
github-actions[bot] Oct 6, 2025
235c517
chore: bump to nightly nightly-2025-10-06
github-actions[bot] Oct 6, 2025
8045b28
chore: merge main into nightly-testing
github-actions[bot] Oct 6, 2025
9b1ffc5
chore: merge main into nightly-testing
github-actions[bot] Oct 7, 2025
9fb2302
chore: bump to nightly nightly-2025-10-07
github-actions[bot] Oct 7, 2025
2712bbb
chore: merge main into nightly-testing
github-actions[bot] Oct 7, 2025
aeb145b
Use the new URL constructor to create addresses; avoids the redundant…
robsimmons Oct 7, 2025
a641b1c
fix: anchor content suggestions and indentation (#558)
david-christiansen Oct 8, 2025
afcb5bb
chore: merge main into nightly-testing
github-actions[bot] Oct 8, 2025
0e274a2
chore: merge main into nightly-testing
github-actions[bot] Oct 8, 2025
5d9ee77
chore: bump to nightly nightly-2025-10-08
github-actions[bot] Oct 8, 2025
405b792
chore: merge main into nightly-testing
github-actions[bot] Oct 9, 2025
0542d56
chore: bump to nightly-2025-10-09 (#562)
david-christiansen Oct 10, 2025
866a019
chore: bump to nightly-2025-10-12 (#571)
david-christiansen Oct 14, 2025
02ea6ca
chore: adapt to modulized SubVerso (#573)
david-christiansen Oct 14, 2025
540380d
chore: merge main into nightly-testing
github-actions[bot] Oct 14, 2025
9f865f1
chore: merge main into nightly-testing
github-actions[bot] Oct 14, 2025
be2ca48
chore: bump to nightly-2025-10-13 (#575)
david-christiansen Oct 14, 2025
7436376
chore: bump to nightly nightly-2025-10-15
github-actions[bot] Oct 15, 2025
114653e
chore: merge main into nightly-testing
github-actions[bot] Oct 16, 2025
262dfe8
chore: merge main into nightly-testing
github-actions[bot] Oct 18, 2025
ae6aa30
fix: make verso-html output correct relative paths (#556)
jcreedcmu Oct 20, 2025
475723c
chore: bump to nightly-2025-10-20 (#583)
david-christiansen Oct 20, 2025
7e05dca
chore: bump to nightly nightly-2025-10-21
github-actions[bot] Oct 21, 2025
3351fe9
chore: merge main into nightly (#586)
david-christiansen Oct 21, 2025
8264258
chore: merge main into nightly-testing
github-actions[bot] Oct 21, 2025
45cd9a2
chore: merge main into nightly-testing
github-actions[bot] Oct 22, 2025
d4553b7
chore: merge main into nightly-testing
github-actions[bot] Oct 22, 2025
249be2e
chore: merge main into nightly-testing
github-actions[bot] Oct 24, 2025
0605b80
chore: merge main into nightly-testing
github-actions[bot] Oct 27, 2025
89628d7
chore: merge main into nightly-testing
github-actions[bot] Oct 28, 2025
da30252
chore: merge main into nightly-testing
github-actions[bot] Oct 29, 2025
f25630f
chore: merge main into nightly-testing
github-actions[bot] Oct 30, 2025
2cde214
chore: merge main into nightly-testing
github-actions[bot] Oct 30, 2025
7d14551
chore: merge main into nightly-testing
github-actions[bot] Oct 31, 2025
806b4b7
chore: bump to nightly-2025-10-31 (#608)
david-christiansen Nov 3, 2025
1219580
chore: merge main into nightly-testing
github-actions[bot] Nov 3, 2025
ba21f81
chore: bump to nightly nightly-2025-11-02
github-actions[bot] Nov 3, 2025
3018ab0
chore: bump to nightly nightly-2025-11-03
github-actions[bot] Nov 3, 2025
d9a035b
chore: merge main into nightly-testing
github-actions[bot] Nov 3, 2025
de2447f
chore: bump to nightly nightly-2025-11-04
github-actions[bot] Nov 4, 2025
2180e15
chore: merge main into nightly-testing
github-actions[bot] Nov 5, 2025
ee6e883
chore: bump to nightly nightly-2025-11-05
github-actions[bot] Nov 5, 2025
56e1c0c
chore: bump to nightly nightly-2025-11-06
github-actions[bot] Nov 6, 2025
e3f031a
chore: bump to nightly nightly-2025-11-07
github-actions[bot] Nov 7, 2025
581dca4
chore: merge main into nightly-testing
github-actions[bot] Nov 8, 2025
6cb676e
chore: bump to nightly nightly-2025-11-08
github-actions[bot] Nov 8, 2025
813b807
chore: merge main into nightly-testing
github-actions[bot] Nov 9, 2025
4b6590f
chore: merge main into nightly-testing
github-actions[bot] Nov 10, 2025
3ec507c
chore: bump to nightly nightly-2025-11-10
github-actions[bot] Nov 10, 2025
85e35f4
chore: bump to nightly nightly-2025-11-11
github-actions[bot] Nov 11, 2025
d58ca2a
chore: merge main into nightly-testing
github-actions[bot] Nov 11, 2025
5af0ec4
chore: merge main into nightly-testing
github-actions[bot] Nov 12, 2025
20ae6e8
chore: bump to nightly nightly-2025-11-12
github-actions[bot] Nov 12, 2025
e8a2a33
chore: merge main into nightly-testing
github-actions[bot] Nov 12, 2025
472d67d
chore: bump to nightly nightly-2025-11-13
github-actions[bot] Nov 13, 2025
aa3ec9d
chore: bump to nightly nightly-2025-11-14
kim-em Nov 17, 2025
af58e37
chore: bump to nightly nightly-2025-11-16
kim-em Nov 17, 2025
f9bea6c
chore: bump to nightly-2025-11-17 (#629)
david-christiansen Nov 17, 2025
68b35e2
chore: move toolchain to v4.26.0-rc1
kim-em Nov 18, 2025
002981b
chore: bump to nightly nightly-2025-11-18
github-actions[bot] Nov 18, 2025
19f4cc0
chore: merge main into nightly-testing (#633)
david-christiansen Nov 18, 2025
a5f5db9
chore: merge main into nightly-testing
github-actions[bot] Nov 18, 2025
371490e
chore: merge main into nightly-testing
github-actions[bot] Nov 19, 2025
a61d5e8
chore: bump to nightly-2025-11-19 (#636)
david-christiansen Nov 19, 2025
0179ece
chore: bump to nightly nightly-2025-11-20
github-actions[bot] Nov 20, 2025
9b58b87
chore: merge main into nightly-testing
github-actions[bot] Nov 20, 2025
73c74ab
chore: merge main into nightly-testing
github-actions[bot] Nov 21, 2025
b7c603d
chore: bump to nightly nightly-2025-11-21
github-actions[bot] Nov 21, 2025
253a941
chore: merge main into nightly-testing
github-actions[bot] Nov 21, 2025
f9c53c2
chore: bump to nightly nightly-2025-11-22
github-actions[bot] Nov 22, 2025
2d514d1
chore: bump to nightly nightly-2025-11-23
github-actions[bot] Nov 23, 2025
b03c779
chore: bump to nightly nightly-2025-11-24
github-actions[bot] Nov 24, 2025
81c1bb8
chore: bump SubVerso in nightly 2025-11-24 (#643)
david-christiansen Nov 25, 2025
a5745c9
chore: bump to nightly-2025-11-25 (#644)
david-christiansen Nov 25, 2025
97f66c8
chore: merge main into nightly-testing and bump to 2025-11-25 (#646)
david-christiansen Nov 25, 2025
0cbaaca
chore: merge main into nightly-testing
github-actions[bot] Nov 26, 2025
84505dc
chore: bump to 2025-11-30 (#647)
david-christiansen Dec 1, 2025
0f3e8c9
chore: bump to nightly nightly-2025-12-01
github-actions[bot] Dec 1, 2025
bed2e99
chore: bump to nightly nightly-2025-12-02
github-actions[bot] Dec 2, 2025
e3c9dcd
chore: bump to nightly nightly-2025-12-03
github-actions[bot] Dec 3, 2025
b40ae9a
chore: merge main into nightly-testing
github-actions[bot] Dec 3, 2025
32c612e
chore: merge main into nightly-testing
github-actions[bot] Dec 4, 2025
a8f20cc
chore: bump to nightly nightly-2025-12-04
github-actions[bot] Dec 4, 2025
3216029
chore: bump to nightly nightly-2025-12-05
github-actions[bot] Dec 5, 2025
d0400dd
chore: bump to nightly nightly-2025-12-06
github-actions[bot] Dec 6, 2025
11e45bf
chore: bump to nightly nightly-2025-12-07
github-actions[bot] Dec 7, 2025
548a163
chore: merge main into nightly-testing
github-actions[bot] Dec 8, 2025
80488b2
chore: bump to nightly nightly-2025-12-08
github-actions[bot] Dec 8, 2025
81c6be4
chore: bump to nightly nightly-2025-12-09
github-actions[bot] Dec 9, 2025
832af34
chore: fix deprecation warnings (#648)
david-christiansen Dec 9, 2025
8c4561f
chore: merge main into nightly-testing
github-actions[bot] Dec 9, 2025
dccdb6e
chore: bump to nightly nightly-2025-12-10
github-actions[bot] Dec 10, 2025
4ca810a
chore: merge main into nightly-testing (#663)
david-christiansen Dec 11, 2025
2f83f78
chore: merge main into nightly-testing
github-actions[bot] Dec 11, 2025
07e6d9b
chore: bump to nightly nightly-2025-12-11
github-actions[bot] Dec 11, 2025
2bde77a
chore: merge main into nightly-testing
github-actions[bot] Dec 11, 2025
4d01ba2
chore: merge main into nightly-testing
github-actions[bot] Dec 12, 2025
85e4421
chore: bump to nightly nightly-2025-12-12
github-actions[bot] Dec 12, 2025
1419531
chore: merge main into nightly-testing
github-actions[bot] Dec 13, 2025
8b2b868
chore: merge main into nightly-testing
github-actions[bot] Dec 13, 2025
0ee6120
chore: bump toolchain to v4.27.0-rc1
kim-em Dec 14, 2025
0ddb288
Merge remote-tracking branch 'origin/nightly-testing' into bump_to_v4…
kim-em Dec 14, 2025
77c2bbe
meta -> meta partial
kim-em Dec 14, 2025
d484694
chore: fix Prettier formatting in index.html
kim-em Dec 14, 2025
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
10 changes: 5 additions & 5 deletions doc/UsersGuide/Markup.lean
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ def log10 (n : Nat) : Nat :=
else 0

def asCode (s : String) : String :=
let lines := s.dropRightWhile (· == '\n') |>.splitToList (· == '\n')
let lines := s.dropEndWhile (· == '\n') |>.split (· == '\n') |>.toList
let lw := log10 lines.length + 1
let pad (s : String) : String :=
(lw - s.length).fold (init := s) fun _ _ => (" " ++ ·)
(lines.mapIdx fun i l => (s!"{toString (i + 1) |> pad}|{l}⏎\n")) |> String.join |>.trimRight
(lines.mapIdx fun i l => (s!"{toString (i + 1) |> pad}|{l}⏎\n")) |> String.join |>.trimAsciiEnd |>.copy

partial def preview (stx : Syntax) : m Std.Format :=
match stx with
Expand Down Expand Up @@ -291,7 +291,7 @@ def markupPreview : DirectiveExpanderOf MarkupPreviewConfig
let `(block|``` | $expected ```) := blk2
| throwErrorAt blk1 "Expected anonymous code block"

let stx ← blocks {} |>.parseString contents.getString.trimRight
let stx ← blocks {} |>.parseString contents.getString.trimAsciiEnd.copy
let p ← preview stx
let p := p.pretty (width := 35)

Expand All @@ -310,8 +310,8 @@ def markupPreview : DirectiveExpanderOf MarkupPreviewConfig
])
where
eq (s1 s2 : String) : Bool :=
let lines1 := s1.trim.splitToList (· == '\n') |>.map (·.trimRight)
let lines2 := s2.trim.splitToList (· == '\n') |>.map (·.trimRight)
let lines1 := s1.trimAscii.split (· == '\n') |>.map (·.trimAsciiEnd) |>.toArray
let lines2 := s2.trimAscii.split (· == '\n') |>.map (·.trimAsciiEnd) |>.toArray
lines1 == lines2

nonemptyI : TSyntax `inline → Bool
Expand Down
2 changes: 1 addition & 1 deletion lake-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "git",
"subDir": null,
"scope": "",
"rev": "74835c84b38e4070b8240a063c6417c767e551ae",
"rev": "160af9e8e7d4ae448f3c92edcc5b6a8522453f11",
"name": "plausible",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
Expand Down
2 changes: 1 addition & 1 deletion lean-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
leanprover/lean4:v4.26.0
leanprover/lean4:v4.27.0-rc1
2 changes: 1 addition & 1 deletion src/multi-verso/MultiVerso.lean
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public def fromXrefJson (root : String) (json : Json) : Except String (NameMap R
| throw s!"Expected JSON array, got {v.compress}"
let v ← v.mapM fun x => do
let address ← x.getObjValAs? String "address"
let address := address.stripPrefix "/" |>.stripSuffix "/" |>.splitOn "/" |>.toArray
let address := address.dropPrefix "/" |>.dropSuffix "/" |>.split "/" |>.toArray |>.map (·.copy)
let htmlId ← x.getObjValAs? String "id"
let data ← x.getObjVal? "data"
pure {link := {root, path := address, htmlId := htmlId.sluggify}, data : RefObject}
Expand Down
2 changes: 1 addition & 1 deletion src/multi-verso/MultiVerso/Link.lean
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ deriving ToJson, FromJson, BEq, Ord, Repr

@[inherit_doc Link.link]
public def RemoteLink.link (link : RemoteLink) : String :=
link.root.stripSuffix "/" ++ link.toLink.link
(link.root.dropSuffix "/").copy ++ link.toLink.link
4 changes: 2 additions & 2 deletions src/multi-verso/MultiVerso/NameMap.lean
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,10 @@ public instance : GetElem? (NameMap α) Name α fun xs n => n ∈ xs where
getElem? xs x := xs.get? x


public instance : ForIn m (NameMap α) (PublicName × α) where
public instance [Monad m] : ForIn m (NameMap α) (PublicName × α) where
forIn xs init f := (xs : Std.TreeMap _ _ _).forIn (fun a b acc => f (a, b) acc) init

instance : ForIn m (NameMap α) (Name × α) where
instance [Monad m] : ForIn m (NameMap α) (Name × α) where
forIn xs init f := (xs : Std.TreeMap _ _ _).forIn (fun a b acc => f (a.toName, b) acc) init

/--
Expand Down
4 changes: 2 additions & 2 deletions src/multi-verso/MultiVerso/Path.lean
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ This relies on the assumption that the path has only directory-like entries. In
public def relativize (path : Path) (url : String) : String := Id.run do
if "/".isPrefixOf url then
let mut path := path.toSubarray
let mut url := url.toSubstring.drop 1
let mut url := url.toSlice.drop 1
while h : path.size > 0 do
-- Get rid of the common prefix of the paths, to avoid unnecessary "../"s
if let some url' := url.dropPrefix? (path[0] ++ "/").toSubstring then
if let some url' := url.dropPrefix? (path[0] ++ "/") then
path := path.drop 1
url := url'
else break
Expand Down
4 changes: 2 additions & 2 deletions src/tests/Tests/Arbitrary.lean
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ instance : Arbitrary LetterString where

instance : Shrinkable LetterString where
shrink s :=
if let some first := s.startValidPos.get? then
if let some first := s.startPos.get? then
let rest := s.drop 1
[String.singleton first] ++ [rest] ++
[String.singleton first] ++ [rest.copy] ++
(instShrinkableLetter.shrink first |>.map (String.singleton · ++ rest))
else []

Expand Down
1 change: 0 additions & 1 deletion src/tests/Tests/VersoManual.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Author: David Thrane Christiansen
-/
import Tests.VersoManual.Html
import Tests.VersoManual.Html.SoftHyphenate
import Tests.VersoManual.Markdown
2 changes: 1 addition & 1 deletion src/tests/Tests/VersoManual/Html.lean
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Expected #[D], seeing #[D]
Done
-/
#guard_msgs in
#eval do
#eval show IO Unit from do
let mut here : Zipper := ⟨[], testToc⟩
let spec := testToc.preorder

Expand Down
4 changes: 2 additions & 2 deletions src/verso-blog/VersoBlog.lean
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ def leanOutput : CodeBlockExpanderOf LeanOutputConfig
pure messages

for m in messages do
Verso.Doc.Suggestion.saveSuggestion str (m.take 30 ++ "…") m
Verso.Doc.Suggestion.saveSuggestion str ((m.take 30).copy ++ "…") m
throwErrorAt str "Didn't match - expected one of: {indentD (toMessageData messages)}\nbut got:{indentD (toMessageData str.getString)}"
where
withNewline (str : String) := if str == "" || str.back != '\n' then str ++ "\n" else str
Expand All @@ -780,7 +780,7 @@ where
pure <| withNewline <| head ++ (← message.data.toString)

mostlyEqual (ws : WhitespaceMode) (s1 s2 : String) : Bool :=
messagesMatch (ws.apply s1.trim) (ws.apply s2.trim)
messagesMatch (ws.apply s1.trimAscii.copy) (ws.apply s2.trimAscii.copy)

open Lean Elab Command in
elab "define_lexed_text" blockName:ident " ← " lexerName:ident : command => do
Expand Down
15 changes: 7 additions & 8 deletions src/verso-blog/VersoBlog/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -419,24 +419,23 @@ defmethod BlogPost.summary (post : BlogPost) : Array (Block Post) := Id.run do
out

partial def TraverseState.freshId (state : Blog.TraverseState) (path : Path) (hint : Slug) : Slug := Id.run do
let hint := if hint.toString.isEmpty then "x".sluggify else hint
let mut idStr := mangle (toString hint)
match state.usedIds[path]? with
| none => return idStr
| some used =>
while used.contains idStr do
idStr := next idStr
idStr := next idStr.toString
return idStr
where
next (idStr : Slug) : Slug :=
match idStr.toString.takeRightWhile (·.isDigit) with
| "" => idStr.toString ++ "1" |>.sluggify
next (idStr : String) : Slug :=
match idStr.takeEndWhile Char.isDigit |>.copy with
| "" => idStr ++ "1" |>.sluggify
| more =>
if let some n := more.toNat? then
idStr.toString.dropRight (more.length) ++ toString (n + 1) |>.sluggify
(idStr.dropEnd more.length).copy ++ toString (n + 1) |>.sluggify
else
idStr.toString.dropRight (more.length) ++ "1" |>.sluggify
mangle (idStr : String) : Multi.Slug := Id.run do
(idStr.dropEnd more.length).copy ++ "1" |>.sluggify
mangle (idStr : String) : Slug := Id.run do
let mut state := false -- found valid leading char?
let mut out := ""
for c in idStr.toList do
Expand Down
24 changes: 12 additions & 12 deletions src/verso-blog/VersoBlog/LiterateLeanPage.lean
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def loadModuleContent
let toolchainfile := projectDir / "lean-toolchain"
if !(← toolchainfile.pathExists) then
throw <| .userError s!"File {toolchainfile} doesn't exist, couldn't load project"
pure (← IO.FS.readFile toolchainfile).trim
pure (← IO.FS.readFile toolchainfile).trimAscii.copy
| some override => pure override

-- Kludge: remove variables introduced by Lake. Clearing out DYLD_LIBRARY_PATH and
Expand Down Expand Up @@ -110,7 +110,7 @@ def Helper.fromModule
let toolchainfile := projectDir / "lean-toolchain"
if !(← toolchainfile.pathExists) then
throw <| .userError s!"File {toolchainfile} doesn't exist, couldn't load project"
pure (← IO.FS.readFile toolchainfile).trim
pure (← IO.FS.readFile toolchainfile).trimAscii.copy
| some override => pure override

-- Kludge: remove variables introduced by Lake. Clearing out DYLD_LIBRARY_PATH and
Expand Down Expand Up @@ -204,40 +204,40 @@ deriving BEq, Hashable, Repr, Inhabited

-- TODO rewrite with dynamic programming
partial def Pat.match (p : List Pat) (str : String) : Option (Lean.NameMap String) :=
go str.startValidPos p
go str.startPos p
where
go iter
| [] => if iter = str.endValidPos then pure {} else failure
| [] => if iter = str.endPos then pure {} else failure
| .char c :: p' =>
if h : iter ≠ str.endValidPos then
if h : iter ≠ str.endPos then
if iter.get h == c then
go (iter.next h) p'
else failure
else failure
| .str s :: p' =>
go iter (s.toList.map .char ++ p')
| .var x :: p' => do
let mut iter' := str.endValidPos
let mut iter' := str.endPos
while iter' ≥ iter do
try
let rest ← go iter' p'
return rest.insert x (iter.extract iter')
return rest.insert x (str.extract iter iter')
catch
| () =>
if h : iter' = str.startValidPos then
if h : iter' = str.startPos then
break
else
iter' := iter'.prev h
continue
failure
| .any :: p' => do
let mut iter' := str.endValidPos
let mut iter' := str.endPos
while iter' ≥ iter do
try
return (← go iter' p')
catch
| () =>
if h : iter' = str.startValidPos then
if h : iter' = str.startPos then
break
else
iter' := iter'.prev h
Expand Down Expand Up @@ -306,8 +306,8 @@ variable [Monad m] [MonadError m] [MonadQuotation m]


partial def getModuleDocString (hl : Highlighted) : m String := do
let str := (← getString hl).trim
let str := str.stripPrefix "/-!" |>.stripSuffix "-/" |>.trim
let str := (← getString hl).trimAscii
let str := str.dropPrefix "/-!" |>.dropSuffix "-/" |>.trimAscii |>.copy
pure str
where getString : Highlighted → m String
| .text txt | .unparsed txt => pure txt
Expand Down
1 change: 0 additions & 1 deletion src/verso-blog/VersoBlog/LiterateLeanPage/Options.lean
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ open Lean MonadOptions

register_option verso.literateMarkdown.logInlines : Bool := {
defValue := false
group := "doc"
descr := "Whether to log failures to elaborate inline code items in Markdown comments."
}

Expand Down
10 changes: 5 additions & 5 deletions src/verso-literate/Main.lean
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ where
| .missing => none

wholeFileInfo : SourceInfo → SourceInfo
| .original l l' t _ => .original l l' t contents.endPos
| .original l l' t _ => .original l l' t contents.rawEndPos
| i => i

instance : ToJson ElabInline where
Expand Down Expand Up @@ -246,16 +246,16 @@ where
if let some doc := doc? then
return #[.modDoc (← toModLit doc)]
else if stx[1].isAtom then
if let some doc := MD4Lean.parse (stx[1].getAtomVal.stripSuffix "-/") then
if let some doc := MD4Lean.parse (stx[1].getAtomVal.dropSuffix "-/").copy then
return #[.markdownModDoc doc]

highlight' (Option.map (#[·]) res.info[0]? |>.getD #[]) stx true
let hl ← modifyGet fun (st : HighlightState) => (Highlighted.fromOutput st.output, {st with output := []})
let hl ← hl.substM (m := HighlightM) fun str => do
if str.endsWith "▲" then
let str := str.dropWhile (· ≠ '▼') |>.drop 1 |>.dropRight 1
let indentStr := str.takeWhile (· ≠ '◄')
let str := str.drop (indentStr.length + 1)
let str := str.dropWhile (· ≠ '▼' : Char → Bool) |>.drop 1 |>.dropEnd 1
let indentStr := str.takeWhile (· ≠ '◄' : Char → Bool)
let str := str.drop (indentStr.chars.count + 1)
let declName := str.toName
let i := indentStr.toNat!
if let some v ← findInternalDocString? (← getEnv) declName then
Expand Down
2 changes: 1 addition & 1 deletion src/verso-literate/VersoLiterate/Exported.lean
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ instance : FromJson Char where
fromJson? v := do
let v ← v.getStr?
if h : v.length = 1 then
return v.startValidPos.get <| by simp_all; intro hv; subst_eqs
return v.startPos.get <| by simp_all; intro hv; subst_eqs
else throw s!"Expected singleton string for `Char`, but got {v.quote}"

deriving instance ToJson, FromJson for MD4Lean.AttrText, MD4Lean.Text, MD4Lean.Li, MD4Lean.Block, MD4Lean.Document
Expand Down
2 changes: 1 addition & 1 deletion src/verso-literate/VersoLiterate/Module.lean
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def loadModuleJson
let toolchainfile := projectDir / "lean-toolchain"
if !(← toolchainfile.pathExists) then
throw <| .userError s!"File {toolchainfile} doesn't exist, couldn't load project"
pure (← IO.FS.readFile toolchainfile).trim
pure (← IO.FS.readFile toolchainfile).trimAscii.copy
| some override => pure override

-- Kludge: remove variables introduced by Lake. Clearing out DYLD_LIBRARY_PATH and
Expand Down
2 changes: 1 addition & 1 deletion src/verso-manual/VersoManual.lean
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ where
| [] => pure cfg

fixBase (base : String) : String :=
if base.takeRight 1 != "/" then base ++ "/" else base
if base.endsWith "/" then base else base ++ "/"

go : ReaderT ExtensionImpls IO UInt32 := do
let hasError ← IO.mkRef false
Expand Down
8 changes: 4 additions & 4 deletions src/verso-manual/VersoManual/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ instance : FromJson Numbering where
else throw s!"Expected exponent 0 for {v.compress}"
| v@(.str s) =>
if h : s.length = 1 then
return .letter <| s.startValidPos.get <| by
return .letter <| s.startPos.get <| by
have : "".length = 0 := by rfl
grind [String.startValidPos_eq_endValidPos_iff]
grind => instantiate only [String.startPos_eq_endPos_iff]
else throw s!"Expected one-character string for {v.compress}"
| other => throw s!"Expected number or string, got {other.compress}"

Expand Down Expand Up @@ -252,7 +252,7 @@ instance : GetElem? Domains Name Domain (fun ds d => ds.contents.contains d) whe

instance : EmptyCollection Domains := ⟨({} : NameMap Domain)⟩

instance : ForIn m Domains (Name × Domain) where
instance [Monad m] : ForIn m Domains (Name × Domain) where
forIn doms init f := inferInstanceAs (ForIn m (NameMap Domain) (NameMap.PublicName × Domain)) |>.forIn doms init fun (n, dom) v =>
-- Eta expansion uses a coercion
f (n, dom) v
Expand Down Expand Up @@ -1075,7 +1075,7 @@ def TraverseState.definitionIds (state : TraverseState) (ctxt : TraverseContext)
if let some examples := state.domains.get? exampleDomain then
let mut idMap := {}
for (x, _) in examples.objects do
let afterSpace := x.dropWhile (· != ' ')
let afterSpace := x.dropWhile (· != ' ') |>.copy
if exampleDeco.isEqSome afterSpace then
if let .ok { htmlId := slug, .. } := state.resolveDomainObject exampleDomain x then
idMap := idMap.insert (x.takeWhile (· != ' ') |>.toName) slug.toString
Expand Down
Loading
Loading