inducer
(Andreas Klöckner)
8월 8, 2023, 2:19오전
1
채팅에서 수식을 활성화하려면 특별한 단계가 필요한가요? 제 인스턴스(Discourse 3.1, 다음 커밋 포함)에서는
committed 11:31PM - 18 Jul 23 UTC
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.… 4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)
---
updated-dependencies:
- dependency-name: word-wrap
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
이 게시물 에서 언급된 채팅+수식 지원이 포함되어 있습니다.
일반적인 토픽에서는 수식이 정상적으로 작동하지만, 채팅에서는 작동하지 않는 것 같습니다. 놓친 단계가 있을까요? 문제 해결을 위해 해볼 수 있는 것이 있을까요?
감사합니다!
1개의 좋아요
inducer
(Andreas Klöckner)
8월 9, 2023, 1:44오전
2
조금 조사해 보았습니다. 현재 이 코드 지점에서:
function mathjax(elem, opts) {
if (!elem) {
return;
}
let mathElems;
if (opts.enable_asciimath) {
mathElems = elem.querySelectorAll(".math, .asciimath");
} else {
mathElems = elem.querySelectorAll(".math");
}
if (mathElems.length > 0) {
const isPreview = elem.classList.contains("d-editor-preview");
ensureMathJax(opts).then(() => {
mathElems.forEach((mathElem) => decorate(mathElem, isPreview));
});
}
}
MathJax를 통해 처리될 요소들이 math CSS 클래스를 가지고 있다고 가정하고 있습니다. 하지만 테스트용 채팅 메시지(Test $\alpha$ math? 사용)의 경우, 등록되어 있는 decorateChatMessage 콜백을 통해 DOM 요소들이 처리될 때 그러한 요소가 하나도 없는 것으로 보입니다.
1개의 좋아요
j.jaffeux
(Joffrey Jaffeux)
8월 14, 2023, 9:24오후
3
좋은 지적 감사합니다. 다음을 통해 수정해야 합니다:
main ← correctly-enables-features
merged 09:24PM - 14 Aug 23 UTC
Prior to this fix discourse-math would not correctly be cooked in chat messages.
5개의 좋아요
j.jaffeux
(Joffrey Jaffeux)
에 닫힘
8월 16, 2023, 9:24오후
4
이 주제는 마지막 답변 후 2일 자동으로 닫혔습니다. 더 이상 새로운 답변을 할 수 없습니다.