From f35347afd44fd5d7fbd6964215d5047395072bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B2=94=EC=88=98?= Date: Tue, 7 Jul 2026 01:25:25 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=EC=9D=B4=EC=8A=88=20#27=20-=20?= =?UTF-8?q?=EB=8B=A4=ED=81=AC=20=ED=85=8C=EB=A7=88=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=ED=8F=AC=EC=8A=A4=20=EC=88=98=EC=8B=9D=20?= =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EB=B0=98=EC=A0=84=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 코드포스 구식 문제의 수식은 espresso 호스트에서 서빙되는 검은 글씨 + 투명 배경 이미지라 다크 테마에서 배경에 묻힘. 기존 data: URI 이미지 반전과 같은 방식으로 espresso 이미지에 invert(0.85) 필터를 적용해 본문 텍스트 밝기에 맞춤. 일반 삽화는 반전 대상에서 제외. --- src/main/kotlin/com/codingtestkit/ui/ProblemPanel.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/kotlin/com/codingtestkit/ui/ProblemPanel.kt b/src/main/kotlin/com/codingtestkit/ui/ProblemPanel.kt index e68c74b..da6fc97 100644 --- a/src/main/kotlin/com/codingtestkit/ui/ProblemPanel.kt +++ b/src/main/kotlin/com/codingtestkit/ui/ProblemPanel.kt @@ -1354,6 +1354,10 @@ class ProblemPanel(private val project: Project) : JPanel(BorderLayout()) { append("th { background: #2b2d30; color: #ccc; font-weight: bold; }") append("img { max-width: 100%; height: auto; }") append("img[src^='data:'] { filter: invert(1); }") + // 코드포스 구식 수식 이미지(espresso 호스트, 검은 글씨 + 투명 배경)는 + // 다크 테마에서 배경에 묻히므로 본문 텍스트 밝기에 맞춰 반전 (이슈 #27). + // 일반 삽화(codeforces.com 호스트)는 반전 대상에서 제외. + append("img[src*='espresso.'] { filter: invert(0.85); }") append("hr { border: none; border-top: 1px solid #3c3f41; margin: 12px 0; }") append("pre { background: #1a1a1a; color: #c5c8c6; padding: 12px; border: 1px solid #3c3f41; font-family: 'JetBrains Mono', monospace; border-radius: 6px; white-space: pre-wrap; line-height: 1.5; }") append("code { background: #2b2d30; color: #c5c8c6; padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }") From 5ae88ebcc6b26be035ad82337493451ee01430e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B2=94=EC=88=98?= Date: Tue, 7 Jul 2026 01:30:08 +0900 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20=EB=AC=B8=EC=A0=9C=20=EB=B7=B0=20?= =?UTF-8?q?=ED=85=8C=EB=A7=88=20=EB=A0=8C=EB=8D=94=EB=A7=81=C2=B7=EB=B2=88?= =?UTF-8?q?=EC=97=AD=20=EB=B3=B4=ED=98=B8=20=EB=8F=99=EC=9E=91=20=EB=AC=B8?= =?UTF-8?q?=EC=84=9C=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 문제 표시가 IDE 테마(다크/라이트)를 따르고, KaTeX 수식과 코드포스 구식 이미지 수식(다크 테마 자동 반전, 이슈 #27)이 어떻게 처리되는지 기술 - 번역 기능 표에 수식·예제 입출력 보호(이슈 #25) 행 추가 --- docs/features/problem-view.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/features/problem-view.md b/docs/features/problem-view.md index 3ed123f..9cb9dc7 100644 --- a/docs/features/problem-view.md +++ b/docs/features/problem-view.md @@ -16,6 +16,8 @@ View the problem description, I/O format, and examples directly in the plugin pa - Input/Output format and constraints - Example test cases with expected I/O - Programmers problems show I/O example tables +- **Follows the IDE theme** (dark/light) — text, tables, and code blocks are styled per theme +- LaTeX formulas rendered with KaTeX in theme-appropriate colors; legacy Codeforces image formulas (black text on transparent background) are auto-inverted in dark theme

Problem View - Top @@ -35,6 +37,7 @@ Translate problem descriptions between Korean and English with one click. | **Toggle Translation** | Click the Translate button to switch between original and translated text | | **Auto Language Detection** | Automatically detects Korean/English and translates to the other | | **Translation Caching** | Results are cached — no repeated API calls for the same problem | +| **Math & sample protection** | LaTeX formulas and sample I/O (`

`) are kept verbatim, never translated |
 | **Rate Limit Protection** | Built-in request throttling and exponential backoff retry |
 
 - Uses the same Google Translate unofficial API used by popular IntelliJ translation plugins (e.g., YiiGuxing Translation Plugin)
@@ -59,6 +62,8 @@ When a problem is fetched, a README.md is optionally generated. You can preview
 - 입출력 형식 및 제약 조건
 - 예제 테스트 케이스와 기대 입출력
 - 프로그래머스 문제는 입출력 예 테이블과 함께 표시
+- **IDE 테마를 따라감** (다크/라이트) — 본문·표·코드 블록이 테마에 맞게 스타일링
+- LaTeX 수식은 KaTeX로 테마에 맞는 색상으로 렌더링. 코드포스 구식 문제의 이미지 수식(투명 배경 + 검은 글씨)은 다크 테마에서 자동 반전 표시
 
 ### 문제 번역 (한 ↔ 영)
 
@@ -69,6 +74,7 @@ When a problem is fetched, a README.md is optionally generated. You can preview
 | **토글 번역** | 번역 버튼 클릭으로 원문/번역 전환 |
 | **자동 언어 감지** | 한국어/영어를 자동 감지하여 반대 언어로 번역 |
 | **번역 캐싱** | 번역 결과를 캐시하여 같은 문제를 다시 번역하지 않음 |
+| **수식·예제 보호** | LaTeX 수식과 예제 입출력(`
`)은 번역하지 않고 원형 유지 |
 | **Rate Limit 보호** | 요청 간 딜레이 및 exponential backoff 재시도로 IP 차단 방지 |
 
 - IntelliJ 번역 플러그인(YiiGuxing Translation Plugin 등)과 동일한 Google Translate 비공식 API 사용