Skip to content

Commit

Permalink
Merge pull request #486 from WolframResearch/485-click-to-copy-curren…
Browse files Browse the repository at this point in the history
…tly-fails-for-code-blocks-on-the-main-branch

Bugfix: dynamic box was preventing editing and code buttons were failing
  • Loading branch information
rhennigan authored Dec 5, 2023
2 parents f3ca2d4 + a796112 commit 42257ff
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Source/Chatbook/Formatting.wl
Original file line number Diff line number Diff line change
Expand Up @@ -1137,14 +1137,9 @@ inlineInteractiveCodeCell // beginDefinition;

inlineInteractiveCodeCell[ display_, string_ ] /; $dynamicText := display;

(* TODO: make this switch dynamically depending on $cloudNotebooks (likely as a TemplateBox)*)
inlineInteractiveCodeCell[ display_, string_ ] :=
With[ { lang = contentLanguage @ string },
Dynamic[
inlineInteractiveCodeCell[ display, string, lang ],
Initialization :> Quiet @ Needs[ "Wolfram`Chatbook`" -> None ],
SingleEvaluation -> True
]
];
inlineInteractiveCodeCell[ display, string, contentLanguage @ string ];

inlineInteractiveCodeCell[ display_, string_, lang_ ] /; $cloudNotebooks :=
cloudInlineInteractiveCodeCell[ display, string, lang ];
Expand Down

0 comments on commit 42257ff

Please sign in to comment.