jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.66k stars 4.92k forks source link

Bidi support in cell outputs #3894

Open matanox opened 6 years ago

matanox commented 6 years ago

Hi,

I've seen multiple issues and PRs about RTL and BIDI, but haven't yet quite found anything applicable very directly to mixed directionality text in cell outputs.

I'm currently using this pattern for safely viewing mixed directionality pandas text columns, in cell outputs:

matches['jupyter_viewable_text'] = df['text'].apply(lambda text: u' \u202B'.join(text.split()))

Whereas as much as this is relevant, my Jupyter notebook is configured for LTR in the UI. While the above works for me in my LTR setup, I am wondering whether there is a direct way of accomplishing correct bidi display in output cells in general, in Jupyter. Likewise if this is already a solved thing in Jupyter, I wonder what's the bidi architecture in Jupyter ― is any configuration expected in Chrome or Jupyter for correct bidi display in cell outputs!

Thanks!!

matanox commented 6 years ago

mildly related: https://github.com/pandas-dev/pandas/issues/7411