mirror of https://github.com/zulip/zulip.git
033351609d
When converting fenced code markdown, we add the language (if specified) in a data-attribute by tweaking the HTML generated. Doing so, allows the frontend to make use of this attr to display view-in-playground option for codeblocks. We use pygments to get the lexer subclass name and use that instead of directly using the language in the data-attribute. Doing so, helps us map different language aliases (like `js` and `javascript`) into a common variable (like `JavaScript`) - and avoids the client from dealing with multiple tags corresponding to the same language. The html structure for a message like this: ``` js ..content.. ``` would now be: <div class="codehilite" data-codehilite-language="JavaScript"> <pre>..content..</pre> </div> Tests and fixtures amended. |
||
---|---|---|
.. | ||
__init__.py | ||
api_arguments_table_generator.py | ||
api_return_values_table_generator.py | ||
fenced_code.py | ||
help_emoticon_translations_table.py | ||
help_relative_links.py | ||
help_settings_links.py | ||
include.py | ||
nested_code_blocks.py | ||
tabbed_sections.py | ||
testing_mocks.py | ||
tlds-alpha-by-domain.txt |