Skip to content

Commit

Permalink
Restyles model names in Markdown to avoid wrapping model names
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonWeill committed Feb 1, 2024
1 parent 0c1c646 commit 0382c38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/jupyter-ai-magics/jupyter_ai_magics/magics.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ def _ai_inline_list_models_for_provider(self, provider_id, Provider):
return Provider.help

for model_id in Provider.models:
output += f", `{provider_id}:{model_id}`"
# Wrap the name in an HTML tag to make all hyphens nonbreaking
output += f", <span style='white-space: nowrap; font-family: monospace;'>{provider_id}:{model_id}</span>"

# Remove initial comma
return re.sub(r"^, ", "", output)
Expand Down

0 comments on commit 0382c38

Please sign in to comment.