Skip to content

Commit 5d87bc5

Browse files
jk-kim0claude
andcommitted
fix(converter): 리스트 항목 내 <br/> 인접 공백을 제거합니다
convert_li()의 ' '.join(li_itself)가 <br/> 앞뒤에 불필요한 공백을 삽입하던 문제를 수정합니다. 빈 <p> 요소에서 발생하는 공백과 trailing whitespace도 함께 정리합니다. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 669ec3b commit 5d87bc5

16 files changed

Lines changed: 173 additions & 127 deletions

File tree

confluence-mdx/bin/converter/core.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,17 @@ def convert_li(self, node, list_type, counter=None):
930930
logging.debug(f'li_itself={li_itself}')
931931
logging.debug(f'child_markdown={child_markdown}')
932932

933-
itself = ' '.join(li_itself)
933+
# Strip trailing whitespace (e.g. space after <br/> before </p>)
934+
# and filter out empty/whitespace-only items from empty <p> elements
935+
li_itself = [item.rstrip() for item in li_itself]
936+
li_itself = [item for item in li_itself if item]
937+
# Join without adding space adjacent to <br/> tags
938+
parts = []
939+
for i, item in enumerate(li_itself):
940+
if i > 0 and item != '<br/>' and not parts[-1].endswith('<br/>'):
941+
parts.append(' ')
942+
parts.append(item)
943+
itself = ''.join(parts)
934944
self.markdown_lines.append(f'{prefix}{itself}\n')
935945
for line in child_markdown:
936946
self.markdown_lines.append(prefix_for_children + line)

confluence-mdx/tests/testcases/1454342158/expected.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ <h3>LDAP 연동</h3>
7171

7272
<li><strong>Server URL</strong> : <code>ldap://ldap.example.com:389</code> 과 같은 형식으로 LDAP server의 주소를 입력합니다. LDAPS의 경우 scheme을 ldaps:// 로 입력합니다.</li>
7373

74-
<li><strong>BindDN</strong> : LDAP 서버에 접속(바인드)할 때 사용할 서비스 계정의 고유 이름(Distinguished Name, DN)을 입력합니다. 이 계정은 최소한 사용자 정보를 검색(Read)할 수 있는 권한이 필요합니다. <br/> 예시: cn=admin,ou=Services,dc=example,dc=com</li>
74+
<li><strong>BindDN</strong> : LDAP 서버에 접속(바인드)할 때 사용할 서비스 계정의 고유 이름(Distinguished Name, DN)을 입력합니다. 이 계정은 최소한 사용자 정보를 검색(Read)할 수 있는 권한이 필요합니다.<br/>예시: cn=admin,ou=Services,dc=example,dc=com</li>
7575

7676
<li><strong>Bind Password</strong> : BindDN의 암호를 입력합니다.</li>
7777

@@ -552,11 +552,11 @@ <h4>QueryPie에서 Okta 연동 및 동기화 설정</h4>
552552

553553
<li><strong>Additional Settings</strong>
554554
<ul>
555-
<li><strong>Make New Users Inactive by Default</strong>: 동기화 시 새로운 사용자를 비활성화 상태로 추가할지 여부를 선택합니다. <br/> 동기화할 사용자 수가 많거나, 사용자의 인증을 통한 QueryPie 접근을 개별적으로 관리하고자 하는 경우 해당 옵션을 활성화하시기 바랍니다.</li>
555+
<li><strong>Make New Users Inactive by Default</strong>: 동기화 시 새로운 사용자를 비활성화 상태로 추가할지 여부를 선택합니다.<br/>동기화할 사용자 수가 많거나, 사용자의 인증을 통한 QueryPie 접근을 개별적으로 관리하고자 하는 경우 해당 옵션을 활성화하시기 바랍니다.</li>
556556

557-
<li><strong>Use an Attribute for Privilege Revoke</strong> : 동기화 시 특정 Attribute에 따라 Privilege를 회수할지 여부를 선택합니다. <br/> 특정 Attribute의 변경에 의해 자동으로 DAC Privilege를 회수하고자 하는 경우 이 옵션을 활성화하세요. <br/> Attribute 입력 필드에 활성화 변경을 감지하려는 Attribute 이름을 입력합니다.</li>
557+
<li><strong>Use an Attribute for Privilege Revoke</strong> : 동기화 시 특정 Attribute에 따라 Privilege를 회수할지 여부를 선택합니다.<br/>특정 Attribute의 변경에 의해 자동으로 DAC Privilege를 회수하고자 하는 경우 이 옵션을 활성화하세요.<br/>Attribute 입력 필드에 활성화 변경을 감지하려는 Attribute 이름을 입력합니다.</li>
558558

559-
<li><strong>Enable Attribute Synchronization</strong> : IdP의 사용자 속성과 QueryPie 사용자 속성을 매핑하여 동기화할지 여부를 선택합니다. <br/> IdP에서 관리 중인 사용자 속성을 QueryPie 내 Attribute와 자동으로 연동하고자 하는 경우, 해당 옵션을 활성화하시기 바랍니다. <br/> 옵션 활성화 시, 하단에 Attribute Mapping UI가 표시되며 매핑 작업을 통해 연동할 IdP Attribute와 QueryPie Attribute를 지정할 수 있습니다. <br/> 단, 해당 기능은 Profile Editor(Admin&gt; General &gt; User Management &gt; Profile Editor)에서 Source Priority가 Inherit from profile source로 설정된 Attribute에 한해 적용됩니다.</li>
559+
<li><strong>Enable Attribute Synchronization</strong> : IdP의 사용자 속성과 QueryPie 사용자 속성을 매핑하여 동기화할지 여부를 선택합니다.<br/>IdP에서 관리 중인 사용자 속성을 QueryPie 내 Attribute와 자동으로 연동하고자 하는 경우, 해당 옵션을 활성화하시기 바랍니다.<br/>옵션 활성화 시, 하단에 Attribute Mapping UI가 표시되며 매핑 작업을 통해 연동할 IdP Attribute와 QueryPie Attribute를 지정할 수 있습니다.<br/>단, 해당 기능은 Profile Editor(Admin&gt; General &gt; User Management &gt; Profile Editor)에서 Source Priority가 Inherit from profile source로 설정된 Attribute에 한해 적용됩니다.</li>
560560

561561
<li><strong>Allowed User Deletion Rate Threshold :</strong>
562562
<ul>
@@ -663,11 +663,11 @@ <h3>One Login 연동</h3>
663663
<ul>
664664
<li><strong>Additional Settings</strong>
665665
<ul>
666-
<li><strong>Make New Users Inactive by Default</strong>: 동기화 시 새로운 사용자를 비활성화 상태로 추가할지 여부를 선택합니다. <br/> 동기화할 사용자 수가 많거나, 사용자의 인증을 통한 QueryPie 접근을 개별적으로 관리하고자 하는 경우 해당 옵션을 활성화하시기 바랍니다.</li>
666+
<li><strong>Make New Users Inactive by Default</strong>: 동기화 시 새로운 사용자를 비활성화 상태로 추가할지 여부를 선택합니다.<br/>동기화할 사용자 수가 많거나, 사용자의 인증을 통한 QueryPie 접근을 개별적으로 관리하고자 하는 경우 해당 옵션을 활성화하시기 바랍니다.</li>
667667

668-
<li><strong>Use an Attribute for Privilege Revoke</strong> : 동기화 시 특정 Attribute에 따라 Privilege를 회수할지 여부를 선택합니다. <br/> 특정 Attribute의 변경에 의해 자동으로 DAC Privilege를 회수하고자 하는 경우 이 옵션을 활성화하세요. <br/> Attribute 입력 필드에 활성화 변경을 감지하려는 Attribute 이름을 입력합니다.</li>
668+
<li><strong>Use an Attribute for Privilege Revoke</strong> : 동기화 시 특정 Attribute에 따라 Privilege를 회수할지 여부를 선택합니다.<br/>특정 Attribute의 변경에 의해 자동으로 DAC Privilege를 회수하고자 하는 경우 이 옵션을 활성화하세요.<br/>Attribute 입력 필드에 활성화 변경을 감지하려는 Attribute 이름을 입력합니다.</li>
669669

670-
<li><strong>Enable Attribute Synchronization</strong> : IdP의 사용자 속성과 QueryPie 사용자 속성을 매핑하여 동기화할지 여부를 선택합니다. <br/> IdP에서 관리 중인 사용자 속성을 QueryPie 내 Attribute와 자동으로 연동하고자 하는 경우, 해당 옵션을 활성화하시기 바랍니다. <br/> 옵션 활성화 시, 하단에 Attribute Mapping UI가 표시되며 매핑 작업을 통해 연동할 IdP Attribute와 QueryPie Attribute를 지정할 수 있습니다. <br/> 단, 해당 기능은 Profile Editor(Admin&gt; General &gt; User Management &gt; Profile Editor)에서 Source Priority가 Inherit from profile source로 설정된 Attribute에 한해 적용됩니다.</li>
670+
<li><strong>Enable Attribute Synchronization</strong> : IdP의 사용자 속성과 QueryPie 사용자 속성을 매핑하여 동기화할지 여부를 선택합니다.<br/>IdP에서 관리 중인 사용자 속성을 QueryPie 내 Attribute와 자동으로 연동하고자 하는 경우, 해당 옵션을 활성화하시기 바랍니다.<br/>옵션 활성화 시, 하단에 Attribute Mapping UI가 표시되며 매핑 작업을 통해 연동할 IdP Attribute와 QueryPie Attribute를 지정할 수 있습니다.<br/>단, 해당 기능은 Profile Editor(Admin&gt; General &gt; User Management &gt; Profile Editor)에서 Source Priority가 Inherit from profile source로 설정된 Attribute에 한해 적용됩니다.</li>
671671

672672
<li><strong>Allowed User Deletion Rate Threshold :</strong>
673673
<ul>
@@ -730,11 +730,11 @@ <h3>Custom Identity Provider</h3>
730730
<ul>
731731
<li><strong>Additional Settings</strong>
732732
<ul>
733-
<li><strong>Make New Users Inactive by Default</strong>: 동기화 시 새로운 사용자를 비활성화 상태로 추가할지 여부를 선택합니다. <br/> 동기화할 사용자 수가 많거나, 사용자의 인증을 통한 QueryPie 접근을 개별적으로 관리하고자 하는 경우 해당 옵션을 활성화하시기 바랍니다.</li>
733+
<li><strong>Make New Users Inactive by Default</strong>: 동기화 시 새로운 사용자를 비활성화 상태로 추가할지 여부를 선택합니다.<br/>동기화할 사용자 수가 많거나, 사용자의 인증을 통한 QueryPie 접근을 개별적으로 관리하고자 하는 경우 해당 옵션을 활성화하시기 바랍니다.</li>
734734

735-
<li><strong>Use an Attribute for Privilege Revoke</strong> : 동기화 시 특정 Attribute에 따라 Privilege를 회수할지 여부를 선택합니다. <br/> 특정 Attribute의 변경에 의해 자동으로 DAC Privilege를 회수하고자 하는 경우 이 옵션을 활성화하세요. <br/> Attribute 입력 필드에 활성화 변경을 감지하려는 Attribute 이름을 입력합니다.</li>
735+
<li><strong>Use an Attribute for Privilege Revoke</strong> : 동기화 시 특정 Attribute에 따라 Privilege를 회수할지 여부를 선택합니다.<br/>특정 Attribute의 변경에 의해 자동으로 DAC Privilege를 회수하고자 하는 경우 이 옵션을 활성화하세요.<br/>Attribute 입력 필드에 활성화 변경을 감지하려는 Attribute 이름을 입력합니다.</li>
736736

737-
<li><strong>Enable Attribute Synchronization</strong> : IdP의 사용자 속성과 QueryPie 사용자 속성을 매핑하여 동기화할지 여부를 선택합니다. <br/> IdP에서 관리 중인 사용자 속성을 QueryPie 내 Attribute와 자동으로 연동하고자 하는 경우, 해당 옵션을 활성화하시기 바랍니다. <br/> 옵션 활성화 시, 하단에 Attribute Mapping UI가 표시되며 매핑 작업을 통해 연동할 IdP Attribute와 QueryPie Attribute를 지정할 수 있습니다. <br/> 단, 해당 기능은 Profile Editor(Admin&gt; General &gt; User Management &gt; Profile Editor)에서 Source Priority가 Inherit from profile source로 설정된 Attribute에 한해 적용됩니다.</li>
737+
<li><strong>Enable Attribute Synchronization</strong> : IdP의 사용자 속성과 QueryPie 사용자 속성을 매핑하여 동기화할지 여부를 선택합니다.<br/>IdP에서 관리 중인 사용자 속성을 QueryPie 내 Attribute와 자동으로 연동하고자 하는 경우, 해당 옵션을 활성화하시기 바랍니다.<br/>옵션 활성화 시, 하단에 Attribute Mapping UI가 표시되며 매핑 작업을 통해 연동할 IdP Attribute와 QueryPie Attribute를 지정할 수 있습니다.<br/>단, 해당 기능은 Profile Editor(Admin&gt; General &gt; User Management &gt; Profile Editor)에서 Source Priority가 Inherit from profile source로 설정된 Attribute에 한해 적용됩니다.</li>
738738

739739
<li><strong>Allowed User Deletion Rate Threshold :</strong>
740740
<ul>

0 commit comments

Comments
 (0)