Skip to content

Commit

Permalink
Prevent FE from creating option names in Global`
Browse files Browse the repository at this point in the history
  • Loading branch information
rhennigan committed Jul 26, 2023
1 parent 585ef31 commit 178b4ae
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 178b4ae

Please sign in to comment.