don't implicitly close transclude blocks

fixes #4592
This commit is contained in:
Travis Staton 2024-01-26 12:27:56 -05:00
parent 9404e207aa
commit a939251ebd
No known key found for this signature in database
GPG Key ID: 431DD911A00DAE49
3 changed files with 9 additions and 6 deletions

View File

@ -1,8 +1,8 @@
```ucm:hide
.> builtins.merge
.> builtins.mergeio
```
```unison:error
```unison
doc = {{ {{ bug "bug"
52 }} }}
```

View File

@ -7,9 +7,12 @@ doc = {{ {{ bug "bug"
Loading changes detected in scratch.u.
I found a closing '}}' here without a matching 'syntax.docTransclude'.
2 | 52 }} }}
I found and typechecked these definitions in scratch.u. If you
do an `add` or `update`, here's how your codebase would
change:
⍟ These new definitions are ok to `add`:
doc : Doc2
```

View File

@ -258,7 +258,7 @@ token'' tok p = do
topHasClosePair :: Layout -> Bool
topHasClosePair [] = False
topHasClosePair ((name, _) : _) =
name `elem` ["{", "(", "[", "handle", "match", "if", "then"]
name `elem` ["syntax.docTransclude", "{", "(", "[", "handle", "match", "if", "then"]
showErrorFancy :: (P.ShowErrorComponent e) => P.ErrorFancy e -> String
showErrorFancy (P.ErrorFail msg) = msg