Skip to content

Commit

Permalink
Merge pull request #295 from WolframResearch/291-symbols-leak-into-gl…
Browse files Browse the repository at this point in the history
…obal-context

Prevent FE from creating option names in Global`
  • Loading branch information
rhennigan authored Jul 26, 2023
2 parents 585ef31 + 178b4ae commit e1b43d1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Source/Chatbook/CreateChatNotebook.wl
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ makeChatNotebookOptions // beginDefinition;

makeChatNotebookOptions[ settings_Association, opts: OptionsPattern[ ] ] := Sequence @@ DeleteDuplicatesBy[
Flatten @ {
FilterRules[ { opts }, UsingFrontEnd @ Options @ Notebook ],
FilterRules[ { opts }, $notebookOptions ],
StyleDefinitions -> $chatbookStylesheet,
If[ settings === <| |>,
Nothing,
Expand All @@ -178,6 +178,11 @@ makeChatNotebookOptions[ settings_Association, opts: OptionsPattern[ ] ] := Sequ

makeChatNotebookOptions // endDefinition;

(* ::**************************************************************************************************************:: *)
(* ::Subsubsection::Closed:: *)
(*$notebookOptions*)
$notebookOptions := $notebookOptions = UsingFrontEnd @ Block[ { $Context = "FrontEnd`" }, Options @ Notebook ];

(* ::**************************************************************************************************************:: *)
(* ::Subsection::Closed:: *)
(*createNotebookFromChatObject*)
Expand Down

0 comments on commit e1b43d1

Please sign in to comment.