mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 18:36:36 +00:00
To increase the discoverability of the possibility of specifying the language for a code block, we trigger the language typeahead when code syntax is added using the code formatting button. A blank option is shown preselected in the typeahead, so that pressing enter will not mistakenly add a language to the code block. We only trigger the typeahead on empty opening fences when added by the button, by setting a state variable to true when adding the syntax using the button, checking for this state when sourcing languages for the code typeahead, and then resetting the state variable to false. Fixes: #29150.
46 KiB
46 KiB