Fix math block alert rendering
This replaces the static markup to recreate an alert with a real `GlAlert` instance for maths blocks. This fixes incorrect styling of the alert, incorrect positioning of the `<copy-code>` element, and also simplifies wiring up of events. Before, the `<copy-code>` button was displaying over the alert's dismiss button. Now, it correctly displays within the maths code block it's associated with. Since `<copy-code>` is absolutely positioned, and its nearest positioned ancestor is the `.js-markdown-code` element, and the alert was the first child of that element, the `<copy-code>` button was rendered over the alert instead of the code block below. Now, the alert is the immediate previous sibling of the `.js-markdown-code` element, instead of its first child. Addresses https://gitlab.com/gitlab-org/gitlab/-/issues/455642 and https://gitlab.com/gitlab-org/gitlab/-/issues/455665. Changelog: fixed
加载中
想要评论请 注册 或 登录