Skip to content

Commit

Permalink
Pull request #118: Bugfix: Handle Windows line endings when reading t…
Browse files Browse the repository at this point in the history
…ext resources

Merge in PAC/chatbook from bugfix/windows-line-endings to main

* commit '86da847c8657b301dcde673b5cb0f74ca6ce7535':
  Increment paclet version
  Bugfix: Handle Windows line endings when reading text resources
  • Loading branch information
rhennigan committed Dec 3, 2024
2 parents b773bc2 + 86da847 commit 8cc691f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion PacletInfo.wl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PacletObject[ <|
"Name" -> "Wolfram/Chatbook",
"PublisherID" -> "Wolfram",
"Version" -> "1.5.2.17",
"Version" -> "1.5.2.18",
"WolframVersion" -> "14.1+",
"Description" -> "Wolfram Notebooks + LLMs",
"License" -> "MIT",
Expand Down
11 changes: 9 additions & 2 deletions Source/Chatbook/Common.wl
Original file line number Diff line number Diff line change
Expand Up @@ -1391,8 +1391,15 @@ getCloudChatbookExpressions[ ] := Enclose[
First[
StringCases[
string,
Shortest[ "@@resource ChatbookExpressions\n{" ~~ exprs__ ~~ "}\n@|" ] :>
Association @ ToExpression[ "{" <> exprs <> "}" ],
Shortest @ StringExpression[
"@@resource ChatbookExpressions",
WhitespaceCharacter...,
"{",
exprs__,
"}",
WhitespaceCharacter...,
"@|"
] :> Association @ ToExpression[ "{" <> exprs <> "}" ],
1
],
$Failed
Expand Down

0 comments on commit 8cc691f

Please sign in to comment.