Repository: zulip/zulip

Issue:
Move markdown help to a frontend template without hardcoded rendered markdown
Our markdown help file `templates/zerver/app/markdown_help.html`, has a bunch of copied HTML in it, which isn't a robust/maintainable strategy.  We have a frontend markdown processor, we should be able to just have a much simpler file HTML containing the raw markdown, and then JavaScript that does extracts the code from each `preserve_spaces` element and installs the rendered markdown based on that in the right column.

Tagging as a priority since this seems like a pretty high-value code cleanup.


Discussion:
Hello @zulip/server-markdown, @zulip/server-refactoring members, this issue was labeled with the "area: markdown", "area: refactoring" labels, so you may want to check it out!

<!-- areaLabelAddition -->
@zulipbot claim
Hello @Krishna-Sivakumar, it looks like you've currently claimed 1 issue in this repository. We encourage new contributors to focus their efforts on at most 1 issue at a time, so please complete your work on your other claimed issues before trying to claim this issue again.

We look forward to your valuable contributions!
@zulipbot claim
Welcome to Zulip, @lokesh576! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:
* Join me on the [Zulip developers' server](https://chat.zulip.org), to get help, chat about this issue, and meet the other developers.
* [Unwatch this repository](https://help.github.com/articles/unwatching-repositories/), so that you don't get 100 emails a day.

As you work on this issue, you'll also want to refer to the [Zulip code contribution guide](https://zulip.readthedocs.io/en/latest/contributing/index.html), as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!
hello! I am contributing for the first time to open source. Can someone please tell me where I can start on this project and what all it is about?
@khushboogupta13 You can go through  [Contributing guidelines](https://github.com/zulip/zulip/blob/master/CONTRIBUTING.md) and to get help or chat with zulip community check out [zulip community](https://chat.zulip.org).
@timabbott where would I find the markdown processor? From what I understand, you want to use the markdown processor to render the raw HTML, instead of specifying it manually.
`static/js/markdown.js`; see also https://zulip.readthedocs.io/en/latest/subsystems/markdown.html.  We can use the frontend processor for this.
Hello @shubham00jain, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days.

You can reclaim this issue or claim any other issue by commenting `@zulipbot claim` on that issue.

Thanks for your contributions, and hope to see you again soon!
@zulipbot claim
Welcome to Zulip, @AT1452! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:
* Join me on the [Zulip developers' server](https://chat.zulip.org), to get help, chat about this issue, and meet the other developers.
* [Unwatch this repository](https://help.github.com/articles/unwatching-repositories/), so that you don't get 100 emails a day.

As you work on this issue, you'll also want to refer to the [Zulip code contribution guide](https://zulip.readthedocs.io/en/latest/contributing/index.html), as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!
@zulipbot abandon
@timabbott I would like to work on this issue, if it's not taken. Please show me where to begin. Thanks!
@timabbott Is this issue already fixed? Would like to collaborate.
This has not been fixed, and the issue description as well as my other comments here should explain what you need to know.  
@zulipbot claim
@zulipbot claim
Welcome to Zulip, @kuroriplus! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:
* Join me on the [Zulip developers' server](https://chat.zulip.org), to get help, chat about this issue, and meet the other developers.
* [Unwatch this repository](https://help.github.com/articles/unwatching-repositories/), so that you don't get 100 emails a day.

As you work on this issue, you'll also want to refer to the [Zulip code contribution guide](https://zulip.readthedocs.io/en/latest/contributing/index.html), as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!
I am working on this one.

Resolving patch:
diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py
--- a/tools/linter_lib/custom_check.py
+++ b/tools/linter_lib/custom_check.py
@@ -630,12 +630,6 @@
     },
     {
         "pattern": r'title="[^{\:]',
-        "exclude_line": {
-            (
-                "templates/zerver/app/markdown_help.html",
-                '<td class="rendered_markdown"><img alt=":heart:" class="emoji" src="/static/generated/emoji/images/emoji/heart.png" title=":heart:" /></td>',
-            ),
-        },
         "exclude": {
             "templates/zerver/emails",
             "templates/analytics/realm_details.html",
@@ -649,7 +643,6 @@
         "exclude": {
             "static/templates/settings/display_settings.hbs",
             "templates/zerver/app/keyboard_shortcuts.html",
-            "templates/zerver/app/markdown_help.html",
         },
         "good_lines": ['<img src="{{source_url}}" alt="{{ _(name) }}" />', '<img alg="" />'],
         "bad_lines": ['<img alt="Foo Image" />'],
@@ -679,8 +672,6 @@
         + "'"
         + "](display: ?none|background: {{|color: {{|background-color: {{).*",
         "exclude": {
-            # KaTeX output uses style attribute
-            "templates/zerver/app/markdown_help.html",
             # 5xx page doesn't have external CSS
             "static/html/5xx.html",
             # exclude_pattern above handles color, but have other issues:


Test patch: