Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions confluence-mdx/bin/converter/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,7 @@ def convert_recursively(self, node):
"""Recursively convert child nodes to Markdown."""
if isinstance(node, NavigableString):
text = navigable_string_as_markdown(node)
if node.parent.name in ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']:
self.markdown_lines.append(text.strip())
else:
self.markdown_lines.append(text)
self.markdown_lines.append(text)
return

logging.debug(f"SingleLineParser: type={type(node).__name__}, name={node.name}, value={repr(node.text)}")
Expand Down
21 changes: 0 additions & 21 deletions confluence-mdx/bin/reverse_sync/roundtrip_verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,26 +119,6 @@ def _normalize_table_cell_lines(text: str) -> str:
return '\n'.join(result)


def _normalize_heading_ws(text: str) -> str:
"""Heading 행의 공백을 정규화한다.

Forward converter가 heading 내 텍스트 노드를 .strip()하므로,
인라인 요소(<strong>, <code> 등) 경계의 공백이 제거된다.
비교 시 이 차이를 무시하기 위해 heading 내용의 공백을 제거하여 비교한다.
"""
lines = text.split('\n')
result = []
for line in lines:
m = re.match(r'^(#{2,6})\s', line)
if m:
prefix = m.group(1)
content = line[len(prefix):].lstrip()
content = re.sub(r'\s+', '', content)
result.append(prefix + ' ' + content)
else:
result.append(line)
return '\n'.join(result)


def _normalize_sentence_breaks(text: str) -> str:
"""Forward converter의 split_into_sentences()에 의한 줄바꿈을 정규화한다.
Expand Down Expand Up @@ -203,7 +183,6 @@ def _apply_normalizations(text: str) -> str:
text = _normalize_table_cell_lines(text)
text = _normalize_html_entities_in_code(text)
text = _normalize_inline_code_boundaries(text)
text = _normalize_heading_ws(text)
text = _normalize_sentence_breaks(text)
text = _normalize_quotes(text)
return text
Expand Down
2 changes: 1 addition & 1 deletion confluence-mdx/tests/testcases/544112828/expected.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ <h4>1. 서버 역할 선택하기</h4>
<div class="callout callout-info" data-type="info"><p>역할이 두 개 이상이라면, Agent 로그인 후 Server 기능 사용을 위해 역할 선택을 먼저 완료해야 합니다.</p>
</div>

<h4><br/>2.Agent로 서버 접속하기</h4>
<h4><br/>2. Agent로 서버 접속하기</h4>

<ul>
<li>접속할 서버를 우클릭 후 Open Connection with 메뉴를 선택하여, 사용하려는 터미널 툴을 선택합니다.</li>
Expand Down
2 changes: 1 addition & 1 deletion confluence-mdx/tests/testcases/544112828/expected.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Agent &gt; Server &gt; Select a Role
역할이 두 개 이상이라면, Agent 로그인 후 Server 기능 사용을 위해 역할 선택을 먼저 완료해야 합니다.
</Callout>

#### <br/>2.Agent로 서버 접속하기
#### <br/>2. Agent로 서버 접속하기

* 접속할 서버를 우클릭 후 Open Connection with 메뉴를 선택하여, 사용하려는 터미널 툴을 선택합니다.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schema_version": "2",
"page_id": "544112828",
"mdx_sha256": "515b770c71d516d432e7c7f5aad5047dc985f1d0b4ec1608ce29391cdffff6d0",
"mdx_sha256": "d00db1b0aabbe8136bff8ba7fa23884a02a9e9d20d057ebd4afece764be056c9",
"source_xhtml_sha256": "b31f4552fd924f4299dfd7dc6edea8f00bfefbf403f5f96011e17a553b24ff67",
"blocks": [
{
Expand Down Expand Up @@ -404,7 +404,7 @@
"block_index": 36,
"xhtml_xpath": "h3[2]",
"xhtml_fragment": "<h3><br />2. <ac:inline-comment-marker ac:ref=\"50b132b2-0b7d-413a-805b-ec80489a780b\">Agent로 서버 접속하기</ac:inline-comment-marker></h3>",
"mdx_content_hash": "48fdfe9f603875e8150faeb15e7bb62d52ef9e6eaae0da72bb11f37780265cae",
"mdx_content_hash": "19c5273fdb5291eb07fcdd53579b840c7ee7cae628a313b3e1231bcd543b6768",
"mdx_line_range": [
135,
135
Expand Down
2 changes: 1 addition & 1 deletion confluence-mdx/tests/testcases/544384417/expected.html
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ <h3>보고서 생성하기</h3>

<p><code>Save</code> 버튼을 클릭하여 보고서 태스크를 저장하고 목록으로 돌아갑니다.</p>

<h3>보고서 복제하기<span style="display:inline-block;padding:2px 5px 2px 4px;margin:0 2px;border-radius:3px;font-size:0.75em;font-weight:700;line-height:1.1;letter-spacing:-0.3px;text-transform:uppercase;white-space:nowrap;position:relative;top:-1px;background-color:#DDDEE1;color:#292A2E">10.2.2</span></h3>
<h3>보고서 복제하기 <span style="display:inline-block;padding:2px 5px 2px 4px;margin:0 2px;border-radius:3px;font-size:0.75em;font-weight:700;line-height:1.1;letter-spacing:-0.3px;text-transform:uppercase;white-space:nowrap;position:relative;top:-1px;background-color:#DDDEE1;color:#292A2E">10.2.2</span></h3>

<figure data-layout="center" data-align="center"><img src="/administrator-manual/audit/reports/reports/screenshot-20241223-104529.png" alt="Administrator &gt; Audit &gt; Reports &gt; Reports - Duplicate Task" width="589"/><figcaption><p>Administrator &gt; Audit &gt; Reports &gt; Reports - Duplicate Task</p>
</figcaption>
Expand Down
2 changes: 1 addition & 1 deletion confluence-mdx/tests/testcases/544384417/expected.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ Administrator &gt; Audit &gt; Reports &gt; Reports &gt; Create

`Save` 버튼을 클릭하여 보고서 태스크를 저장하고 목록으로 돌아갑니다.

### 보고서 복제하기<Badge color="grey">10.2.2</Badge>
### 보고서 복제하기 <Badge color="grey">10.2.2</Badge>

<figure data-layout="center" data-align="center">
<img src="/administrator-manual/audit/reports/reports/screenshot-20241223-104529.png" alt="Administrator &gt; Audit &gt; Reports &gt; Reports - Duplicate Task" width="589" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schema_version": "2",
"page_id": "544384417",
"mdx_sha256": "2aa3d2cfb9df8f558ebe0fa569a42c7ae4fa6d26ff9c4223ab51f376c0dc37c1",
"mdx_sha256": "4b96a4535c91347c0855f4564fe7034161b5eb987cc05939cfa8b025220e530b",
"source_xhtml_sha256": "a4e2f99d4cec940a78d4fec41ca182195bcca8a70edd3085f72d5e778c47d4c0",
"blocks": [
{
Expand Down Expand Up @@ -338,7 +338,7 @@
"block_index": 30,
"xhtml_xpath": "ac:image[4]",
"xhtml_fragment": "<ac:image ac:align=\"center\" ac:layout=\"center\" ac:original-height=\"1005\" ac:original-width=\"1627\" ac:custom-width=\"true\" ac:alt=\"스크린샷 2024-12-23 오전 10.45.29.png\" ac:width=\"589\"><ri:attachment ri:filename=\"스크린샷 2024-12-23 오전 10.45.29.png\" ri:version-at-save=\"1\" /><ac:caption><p>Administrator &gt; Audit &gt; Reports &gt; Reports - Duplicate Task</p></ac:caption><ac:adf-mark key=\"border\" size=\"1\" color=\"#091e4224\" /></ac:image>",
"mdx_content_hash": "ab1da70db6eada1e421ce73dba7703c6e331ce9c30412c1f17ae8addf08af6c8",
"mdx_content_hash": "4717dbed3a74575da20a27f83fd83c6c78af7e7d218051cf7428d1cecc1ea32a",
"mdx_line_range": [
800,
800
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ _TEXT_ `_TEXT_`

_TEXT_ `_TEXT_`

_TEXT_<Badge color="grey">_TEXT_</Badge>
_TEXT_ <Badge color="grey">_TEXT_</Badge>

<figure data-layout="center" data-align="center">
<img src="/administrator-manual/audit/reports/reports/screenshot-20241223-104529.png" alt="_TEXT_" width="589" />
Expand Down