lablup / lablup/backend.ai

Unify server announcement formatting between CLI and WebUI

Open
#3,194 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

cc: @yomybaby @adrysnupstream: Textualize/rich#3565

I found that one of our customer sites has a server announcement like:

![https://github.com/user-attachments/assets/e6b5112f-1660-4418-b6fe-d407067f1ce0](https://github.com/user-attachments/assets/e6b5112f-1660-4418-b6fe-d407067f1ce0)

The CLI interprets the server announcement as the Markdown formatter via [Rich](https://rich.readthedocs.io/en/latest/), and it seems to strip all the remaining text once an HTML tag appears.

```python
import sys
from rich.console import Console
from rich.markdown import Markdown

raw_doc = """
# header
plain text

html paragraph


another line
"""
print("------------", file=sys.stderr)
print(raw_doc)
print("------------", file=sys.stderr)
console = Console(stderr=True)
doc = Markdown(raw_doc)
console.print(doc)
```

![https://github.com/user-attachments/assets/538be017-f955-49fd-b95d-6900313d6d5a](https://github.com/user-attachments/assets/538be017-f955-49fd-b95d-6900313d6d5a)

We need to ensure that either `rich.markdown` recognizes the HTML tags or the Web UI uses a proper Markdown renderer and let the customer admins write the server announcements in Markdown _without mixing HTML_.

JIRA Issue: BA-25

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.