Zulip 服务器和 Web 应用程序。开源团队聊天可帮助团队保持高效和专注。
Go to file
Alex Vandiver fa6daee4e1 markdown: Fix use of pure_markdown for non-pure markdown rendering.
`render_markdown_path` renders Markdown, and also (since baff121115)
runs Jinja2 on the resulting HTML.

The `pure_markdown` flag was added in 0a99fa2fd6, and did two
things: retried the path directly in the filesystem if it wasn't found
by the Jinja2 resolver, and also skipped the subsequent Jinja2
templating step (regardless of where the content was found).  In this
context, the name `pure_markdown` made some sense.  The only two
callsites were the TOS and privacy policy renders, which might have
had user-supplied arbitrary paths, and we wished to handle absolute
paths in addition to ones inside `templates/`.

Unfortunately, the follow-up of 01bd55bbcb did not refactor the
logic -- it changed it, by making `pure_markdown` only do the former
of the two behaviors.  Passing `pure_markdown=True` after that commit
still caused it to always run Jinja2, but allowed it to look elsewhere
in the filesystem.

This set the stage for calls, such as the one introduced in
dedea23745, which passed both a context for Jinja2, as well as
`pure_markdown=True` implying that Jinja2 was not to be used.

Split the two previous behaviors of the `pure_markdown` flag, and use
pre-existing data to control them, rather than an explicit flag.  For
handling policy information which is stored at an absolute path
outside of the template root, we switch to using the template search
path if and only if the path is relative.  This also closes the
potential inconsistency based on CWD when `pure_markdown=True` was
passed and the path was relative, not absolute.

Decide whether to run Jinja2 based on if a context is passed in at
all.  This restores the behavior in the initial 0a99fa2fd6 where a
call to `rendar_markdown_path` could be made to just render markdown,
and not some other unmentioned and unrelated templating language as
well.
2023-03-17 08:46:25 -07:00
.github ci: Run generate-failure-message from the right path. 2023-03-09 13:20:24 -08:00
.tx provision: Replace transifex-client with new transifex-cli. 2022-12-13 12:34:08 -08:00
.vscode vscode: Recommend remote development extension. 2021-11-03 16:03:46 -07:00
analytics invites: Switch new LIMITED-plan heuristic to enforcing. 2023-03-16 11:41:49 -07:00
api_docs UserTopic: Set visibility_policy or delete UserTopic row without error. 2023-03-16 10:55:54 -07:00
confirmation models: Remove type prefixes from __str__ values. 2023-03-08 22:56:55 -08:00
corporate portico: Add landing page about trying Zulip by visiting chat.zulip.org. 2023-03-14 13:21:09 -07:00
docs templates: Support context variables in Handlebars {{t}} helper. 2023-03-16 11:26:45 -07:00
help help: Add a dedicated page on how to add emphasis to text. 2023-03-16 10:51:57 -07:00
locale i18n: Update translation data from Transifex. 2023-03-15 15:57:26 -07:00
pgroonga migrations: Import BaseDatabaseSchemaEditor from its canonical module. 2023-03-05 14:46:28 -08:00
puppet puppet: Enable sentry hooks for production and staging. 2023-03-17 08:10:31 -07:00
requirements cache: Use QuerySetAny for isinstance check. 2023-03-17 08:38:20 -07:00
scripts install-node: Upgrade Node.js from 18.14.1 to 18.15.0. 2023-03-16 12:32:28 -07:00
static integrations: Update Asana integration doc to point to Zapier. 2023-03-02 13:51:34 -08:00
stubs/taint actions: Split out zerver.actions.message_send. 2022-04-14 17:14:34 -07:00
templates markdown: Fix use of pure_markdown for non-pure markdown rendering. 2023-03-17 08:46:25 -07:00
tools custom_check: Update FILES_WITH_LEGACY_SUBJECT set. 2023-03-14 17:48:57 -07:00
var/puppeteer puppeteer_tests: Port to TypeScript. 2021-02-22 16:03:10 -08:00
web message_row: Fix rewrapping message lines after receiving ack. 2023-03-17 08:10:13 -07:00
zerver markdown: Fix use of pure_markdown for non-pure markdown rendering. 2023-03-17 08:46:25 -07:00
zilencer zilencer: Switch a log message back from %r to %s. 2023-03-08 22:56:55 -08:00
zproject google_analytics: Track realm registration separately from user signup. 2023-03-08 11:34:36 -08:00
.codecov.yml codecov: Change threshold to use percentage syntax. 2019-07-20 14:37:04 -07:00
.codespellignore contributor docs: Add a page on design discussions. 2022-09-30 12:15:04 -07:00
.editorconfig editorconfig: Restore indent_size = 2 for Markdown. 2021-08-20 23:14:37 -07:00
.eslintignore web: Move web app to ‘web’ directory. 2023-02-23 16:04:17 -08:00
.eslintrc.json eslint: Enable @typescript-eslint/recommended plugin. 2023-03-16 13:24:27 -07:00
.gitattributes .gitattributes: Mark *.bmp, *.bson, *.mp3, *.pdf as binary. 2022-02-07 18:51:06 -08:00
.gitignore lint: Replace pycodestyle and pyflakes with ruff. 2022-11-03 12:10:15 -07:00
.gitlint gitlint-rules: Rename to gitlint_rules. 2023-03-03 18:02:38 -08:00
.mailmap mailmap: Add entry for rht. 2022-11-17 00:05:17 -08:00
.npmignore Add proxy notes to new README.dev.md troubleshooting section. 2016-03-29 21:54:05 -07:00
.prettierignore web: Move web app to ‘web’ directory. 2023-02-23 16:04:17 -08:00
.pyre_configuration pysa: Update .pyre_configuration to point to typeshed. 2020-09-22 15:44:47 -07:00
.readthedocs.yaml readthedocs: Add a configuration file. 2023-02-03 16:36:54 -08:00
.sonarcloud.properties tools: Configure Zulip to be scannable by SonarCloud. 2020-06-24 12:41:17 -07:00
.yarnrc .yarnrc: Set ignore-scripts true. 2019-08-28 16:15:54 -07:00
CODE_OF_CONDUCT.md contributor docs: Add guidelines on moderating the Zulip community. 2022-12-02 16:57:41 -08:00
CONTRIBUTING.md docs: Remove paragraph about getting help finding issues in contributing. 2023-01-17 14:51:53 -08:00
Dockerfile-postgresql docker: Document the PostgreSQL Dockerfile build steps. 2022-04-26 18:00:00 -07:00
LICENSE license: Move copyright notice from LICENSE to NOTICE. 2021-02-05 09:28:12 -08:00
manage.py ruff: Fix SIM102 nested if statements. 2023-01-23 11:18:36 -08:00
NOTICE docs: Bump copyright year. 2021-02-05 09:28:15 -08:00
package.json dependencies: Add @types/blueimp-md5. 2023-03-16 10:47:12 -07:00
prettier.config.js prettier: Disable embedded language formatting for Markdown. 2021-08-20 23:14:37 -07:00
pyproject.toml requirements: Upgrade Python requirements. 2023-03-05 14:46:28 -08:00
README.md README: Add Ruff badge. 2023-01-04 16:22:12 -08:00
SECURITY.md SECURITY.md: Reorder and make clearer how to subscribe to announcements. 2022-01-07 15:56:26 -08:00
stylelint.config.js yarn: Add package which allows creating css mixins. 2021-12-09 18:15:18 -08:00
tsconfig.json web: Move web app to ‘web’ directory. 2023-02-23 16:04:17 -08:00
Vagrantfile vagrant: Add Fedora 36 support. 2022-09-08 16:12:59 -07:00
version.py cache: Use QuerySetAny for isinstance check. 2023-03-17 08:38:20 -07:00
yarn.lock dependencies: Add @types/blueimp-md5. 2023-03-16 10:47:12 -07:00

Zulip overview

Zulip is an open-source team collaboration tool with unique topic-based threading that combines the best of email and chat to make remote work productive and delightful. Fortune 500 companies, leading open source projects, and thousands of other organizations use Zulip every day. Zulip is the only modern team chat app that is designed for both live and asynchronous conversations.

Zulip is built by a distributed community of developers from all around the world, with 74+ people who have each contributed 100+ commits. With over 1000 contributors merging over 500 commits a month, Zulip is the largest and fastest growing open source team chat project.

Come find us on the development community chat!

GitHub Actions build status coverage status Mypy coverage Ruff code style: black code style: prettier GitHub release docs Zulip chat Twitter GitHub Sponsors

Getting started

You may also be interested in reading our blog, and following us on Twitter and LinkedIn.

Zulip is distributed under the Apache 2.0 license.