# 괄호 안 텍스트가 굵게 표시되지 않음

**URL:** <https://meta.discourse.org/t/no-bold-formatting-of-text-in-parentheses/167390>\
**Category:** Support\
**Created:** [10월 16, 2020, 6:21오후 UTC](https://meta.discourse.org/t/no-bold-formatting-of-text-in-parentheses/167390 "2020-10-16T18:21:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmomas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tmomas/32/109144_2.png) [@tmomas](https://meta.discourse.org/u/tmomas)\
**Post date:** [10월 16, 2020, 6:21오후 UTC](https://meta.discourse.org/t/no-bold-formatting-of-text-in-parentheses/167390/1 "2020-10-16T18:21:27Z")

</div>

**문제:** 괄호 안의 텍스트에 굵게 서식(bold formatting)이 적용되지 않는 문제. 괄호 앞에 또는 뒤에 다른 문자가 있는 경우 발생합니다.

\*\*(5255)\*\*를 강조하고 싶은 예시 텍스트:

> 1.0.15 Build 20200721 rel.40773(5255)

40773\*\*(5255)\*\* → 실패(NOK)  
**40773** (5255)  
40773 **5255**

* * *

이제 첫 줄 끝에 마침표 하나를 추가합니다.  
1, 2, 3번째 줄이 어떻게 변하는지 주목해 보세요:

40773\*\*(5255)**.  
 40773(5255)  
40773**5255\*\*

* * *

# 다른 예시들로 실험해 보기

## 괄호 없는 경우: 모두 정상(OK).

**paren** theses → OK  
paren **theses** → OK  
a **parentheses** 1 → OK  
a **parentheses** a → OK  
a **parentheses**.1 → OK  
a **parentheses** #1 → OK  
a **parentheses**?1 → OK

## 괄호가 있는 경우: 이상한 일이 발생합니다.

**parentheses** → OK  
**(parentheses)** → OK  
\*\*(parentheses)\*\*1 → 실패(NOK)  
**(parentheses)**.1 → OK  
\*\*(parentheses)\*\*a → 실패(NOK)  
**(parentheses)**.a → 실패(NOK)  
**(parentheses)**#1 → OK  
**(parentheses)**?1 → OK

a\*\*(parentheses)**1 → 실패(NOK)  
a**(parentheses)\*\*1 → 실패(NOK)

a\*\*(parentheses)\*\*1 → 실패(NOK)

* * *

같은 줄을 빈 줄로 구분하여 두 번 작성

paren\*\*(thes)\*\*es → 실패(NOK)

paren\*\*(thes)\*\*es → 실패(NOK)

* * *

위와 같지만, 빈 줄로 구분하지 않은 경우

**(paren)theses → 실패(NOK)  
paren(theses)** → 실패(NOK)

* * *

---

<div class="post-metadata">

**Author:** ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)\
**Post date:** [10월 16, 2020, 7:26오후 UTC](https://meta.discourse.org/t/no-bold-formatting-of-text-in-parentheses/167390/2 "2020-10-16T19:26:18Z")

</div>

기억이 정확하다면, 이는 마크다운 사양의 한계입니다.

> <https://github.com/commonmark/commonmark-spec/blob/bc1ebdb9a938dd94af0a7022f7b64b01a18cb411/spec.txt#L6092>

> **[commonmark.js demo](https://spec.commonmark.org/dingus/)**

우리가 따르는 사양입니다. 해당 링크에서 시도해 보세요. 거기서도 작동하지 않습니다.

성능을 유지하면서 파서가 할 수 있는 것에는 한계가 있으며, 제가 언급한 것처럼 마크다운 파서가 실제로 그렇게 동작하는 사례를 본 적이 없지만, 제가 틀렸을 수도 있습니다.
