Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyphens in model IDs can break across lines in "%ai list" markdown output #604

Closed
JasonWeill opened this issue Jan 26, 2024 · 3 comments · Fixed by #606
Closed

Hyphens in model IDs can break across lines in "%ai list" markdown output #604

JasonWeill opened this issue Jan 26, 2024 · 3 comments · Fixed by #606
Labels
enhancement New feature or request good first issue Good for newcomers @jupyter-ai/magics

Comments

@JasonWeill
Copy link
Collaborator

Problem

In the output of %ai list in markdown, model IDs use hyphens, which can cause model IDs to break across lines, making them harder to read and copy in their entirety:

image

Proposed Solution

Use nonbreaking hyphens (U+2011 in Unicode) to represent model IDs in the %ai list command's output in markdown.

Additional context

Text output should be unaffected

@JasonWeill JasonWeill added enhancement New feature or request good first issue Good for newcomers @jupyter-ai/magics labels Jan 26, 2024
@krassowski
Copy link
Member

If the non-breaking hyphen are used, will the identifiers still be useful when copy-pasted? An alternative would be to use CSS word-break: keep-all.

@JasonWeill
Copy link
Collaborator Author

I was going to look at that; can I set CSS rules inside a markdown table in a cell?

@krassowski
Copy link
Member

You can wrap the cell content in a div or multiple span elements and set style="" on them, which should work in most renderers (while unlikely, some frontends may sanitise all styles out in Markdown so not guaranteed to always display as intended).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers @jupyter-ai/magics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants