-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
documentation: (marimo) move module_html helper to utils (#3714)
Unifies how we show modules in marimo notebooks.
- Loading branch information
1 parent
69cec51
commit 460bd6e
Showing
3 changed files
with
23 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
import marimo as mo | ||
|
||
from xdsl.dialects.builtin import ModuleOp | ||
|
||
|
||
def asm_html(asm: str) -> mo.Html: | ||
""" | ||
Returns a Marimo-optimised representation of the assembly code passed in. | ||
""" | ||
return mo.ui.code_editor(asm, language="python", disabled=True) | ||
|
||
|
||
def module_html(module: ModuleOp) -> mo.Html: | ||
""" | ||
Returns a Marimo-optimised representation of the module passed in. | ||
""" | ||
return mo.ui.code_editor(str(module), language="javascript", disabled=True) |