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

fix: edge cases highlight codeblock #3984

Merged
merged 1 commit into from
Nov 10, 2024
Merged

fix: edge cases highlight codeblock #3984

merged 1 commit into from
Nov 10, 2024

Conversation

urmauur
Copy link
Member

@urmauur urmauur commented Nov 10, 2024

Describe Your Changes

Enforce strict code block rules,

  • The code block should start with triple backticks followed by a file extension (```css), and end with triple backticks (```).
    This ensures that the code block is correctly defined with both the opening and closing triple backticks, with an optional file extension immediately after the opening backticks.
Screenshot 2024-11-10 at 17 06 30
  • Multiple code blocks may impact each other. For example, if one of the code blocks is missing a formatting rule (e.g., missing the closing backticks), none of the code blocks will be highlighted
Screenshot 2024-11-10 at 17 10 06

Fixes Issues

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

@urmauur urmauur added type: bug Something isn't working type: enhancement Improves a current feature labels Nov 10, 2024
@urmauur urmauur added this to the v0.5.8 milestone Nov 10, 2024
@urmauur urmauur requested a review from a team November 10, 2024 10:12
@urmauur urmauur self-assigned this Nov 10, 2024
Copy link
Contributor

Barecheck - Code coverage report

Total: 69.34%

Your code coverage diff: 0.04% ▴

Uncovered files and lines
FileLines
web/screens/Thread/ThreadCenterPanel/ChatInput/RichTextEditor.tsx96-97, 99, 119-120, 122, 143, 152, 155, 163, 165-168, 175, 180-181, 183, 185-186, 188, 190, 194, 209, 270, 273-274, 278, 289, 314-319, 336, 352, 358

@urmauur urmauur merged commit 244d3d1 into dev Nov 10, 2024
11 checks passed
@urmauur urmauur deleted the fix/edge-cases-codeblock branch November 10, 2024 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working type: enhancement Improves a current feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: Handle edge cases around syntax highlighting feature in input box
2 participants