Skip to content

Commit

Permalink
fixes js that adds prompt to console and ipython snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
edublancas committed Nov 3, 2021
1 parent f24083e commit 618c277
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion doc/_static/js/custom.js
Expand Up @@ -38,10 +38,12 @@ $(document).ready(function () {
$(this).find(".copy-message").text("Copied!");
});

// select terminal containers, but only the console and ipython ones
const terminal_containers = [
...document.querySelectorAll("div[class*=notranslate]"),
...document.querySelectorAll("div.highlight-console, div.ipython"),
];

// add the prompt to the beginning of each line (console and ipython only)
terminal_containers.map((parent) => {
const pre = parent.querySelector(".highlight pre");
const processed_pre = pre.innerHTML.split("\n").filter((code_span) => {
Expand Down
3 changes: 2 additions & 1 deletion doc/user-guide/jupyter.rst
Expand Up @@ -241,7 +241,8 @@ environment variable. For example, to load a ``pipeline.serve.yaml``:

.. code-block:: console
export ENTRY_POINT=pipeline.serve.yaml && jupyter lab
export ENTRY_POINT=pipeline.serve.yaml
jupyter lab
Note that ``ENTRY_POINT`` must be a file name and not a path. When you start
Expand Down

0 comments on commit 618c277

Please sign in to comment.