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

the bold text appears as **text** on the reading page #6683

Open
jochne opened this issue Mar 18, 2024 · 2 comments
Open

the bold text appears as **text** on the reading page #6683

jochne opened this issue Mar 18, 2024 · 2 comments
Labels

Comments

@jochne
Copy link

jochne commented Mar 18, 2024

Bug Report:

Bug Description:
In a Chinese language environment, while using Outline self-hosted version 0.75.2, when a sentence includes text formatted in bold within the editor, this formatting does not carry over to the shared reading page. Instead, the bold text appears as **text** on the reading page.

To Reproduce:

  1. Access the Outline self-hosted platform (version 0.75.2).
  2. Create or edit an article containing a sentence with Chinese characters in bold format.
  3. Save the changes and preview or share the article to view the read-only version.
  4. Notice how the bold formatting is not preserved; it's displayed as **text**.

Expected Behavior:
When a user formats text as bold within the editor, this formatting should be consistently maintained across all views, including the shared reading page.

Desktop Environment Details:

  • OS: macOS 14.2.1
  • Browser: Chrome
  • Version: 121.0.6167.184 (Official Build) (arm64)

On shared page with view mode

CleanShot 2024-03-18 at 4  10 38@2x

On the page after login or in edit mode

CleanShot 2024-03-18 at 4  10 58@2x

@jochne jochne added the bug label Mar 18, 2024
Copy link

linear bot commented Mar 18, 2024

@shepherdwind
Copy link

shepherdwind commented May 4, 2024

I also encountered this problem. I fixed it in my own fork at shepherdwind@266ff7b. You can try the image I built at https://hub.docker.com/r/shepherdwind/outline. As for the markdown-it plugin, I will release a separate package.

The root cause of the issue is that markdown-it parses **==xxx==**xx-like processes abnormally. When a special character such as +-= or a Chinese semicolons here is encountered before the second **, it recognizes an unclosable tag, so two open ** are ultimately output directly. In edit mode, rendering follows a different process, so there are no issues on the editing page.

https://github.com/outline/outline/blob/main/app/scenes/Document/components/Document.tsx#L404-L405

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants