zulip/frontend_tests
Sumanth V Rao ca7f84ac58 markdown: bugfix: Fix importing pygments data for codeblock header creation.
In c563cdba61 we imported the generated
pygments data from outside `/shared` folder. This had a couple of
problems:
    * Using `require` was the wrong way to do the import in ES6 modules.
    * Since we get the data from outside `/shared`, clients like
      zulip-mobile would not receive it - this case had to be handeled.

Here, we fix the above problems by receiving the data when initializing
through fenced_code.initialize, and when the pygments data structure is
empty (for zulip-mobile) we fallback to the old header structure without
the data-code-language tag.

Also, this commit does a small refactor to improve the way we fetch
canonicalized_alias from pygments_data.

Tests amended.
2020-09-28 15:39:31 -07:00
..
node_tests markdown: bugfix: Fix importing pygments data for codeblock header creation. 2020-09-28 15:39:31 -07:00
puppeteer_lib puppeteer_tests: Migrate deprecated waitFor call to waitForFunction. 2020-09-28 10:54:14 -07:00
puppeteer_tests puppeteer: Fix typing issue in settings test. 2020-09-28 10:54:53 -07:00
zjsunit eslint: Replace empty-returns with consistent-return. 2020-09-25 15:17:59 -07:00