Skip to content

fix(examples): preserve newlines in copied code snippets#213

Open
exekis wants to merge 1 commit intoleanprover:masterfrom
exekis:master
Open

fix(examples): preserve newlines in copied code snippets#213
exekis wants to merge 1 commit intoleanprover:masterfrom
exekis:master

Conversation

@exekis
Copy link

@exekis exekis commented Dec 24, 2025

Fixes #165

Copying code blocks was smooshing everything together like #check Nat#check Bool. Turns out dropOneNl was eating the newlines. Removed it :)

Remove dropOneNl function that was stripping trailing newlines from
code items, causing structural formatting to be lost when copying.

Also ensures trailing whitespace is properly extracted and included
in the copy string for all code item types, not just those with
trailing comments.

Fixes leanprover#165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code Snippets from TPIL4 Lose Structural Formatting on Copy

1 participant