Skip to content

Style inline code like code blocks (via #1012) #1346

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

Merged
merged 2 commits into from
Mar 22, 2023

Conversation

neiljp
Copy link
Collaborator

@neiljp neiljp commented Mar 21, 2023

What does this PR do?

This adapts the last commit of #1012, which was neglected while discussing how to handle the padding/blocking of codeblock rendering.

The change is now in messages.py, but works well after a manual movement.

The associated removal of msg_code is split into a second commit which instead renames the style to ui_code, since it is still used in a notification popup. This could have been migrated to use the pygments style too, but for now it feels cleaner to keep pygments within the message rendering functionality, and not hard-code the style elsewhere.

Tested?

  • Manually
  • Existing tests (adapted, if necessary)
  • New tests added (for any new behavior)
  • Passed linting & tests (each commit)

@neiljp neiljp added area: message rendering PR ready to be merged PR has been reviewed & is ready to be merged area: refactoring labels Mar 21, 2023
Rohitth007 and others added 2 commits March 21, 2023 16:44
This ensures similar rendering of the two code formats, by using the style
used for plain codeblocks for inline code: "pygments:w".

Test amended.

Adapted from the last commit of zulip#1012 by neiljp.
msg_code is no longer used in message rendering, only in an error notification,
so it is clearer to rename it to ui_code.
@zulipbot zulipbot added the size: M [Automatic label added by zulipbot] label Mar 21, 2023
@neiljp neiljp merged commit b89def6 into zulip:main Mar 22, 2023
@neiljp neiljp added this to the Next Release milestone Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: message rendering area: refactoring PR ready to be merged PR has been reviewed & is ready to be merged size: M [Automatic label added by zulipbot]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants