Skip to content

파싱한 markdown에서 toggle용 html을 가지고 있을 경우 정상적으로 렌더링 안되는 문제 해결 #52

@dididy

Description

@dididy

Is your feature request related to a problem? Please describe.

markdown 파싱한걸 @uiw/react-md-editor로 렌더링할 때 아래와 같이 toggle용 html을 가지고 있을 경우 정상적으로 렌더링 되지 않습니다.

<details>
<summary>Click to toggle contents of `code`</summary>
test
</details>

Describe the solution you'd like

https://uiwjs.github.io/react-markdown-editor/

위 링크에서 확인해본 결과 @uiw/react-md-editor를 사용할 경우 아래와 같이 details 태그 사이에 공백이 있을 경우 제대로 동작하지 않습니다. 단, 같은 형태의 코드가 GitHub에서 렌더링 되는 경우에는 의도한 대로 동작합니다.

  1. details 태그를 잡아서 내부적으로 공백이 있을 경우 이를 제거하는 코드를 추가하거나
  2. 다른 markdown 렌더러를 사용하는 방법 등이 있을 것 같습니다.
<details>
<summary> test1 </summary>
789
</details>

<details>
<summary> test2 </summary>
  
456
  
</details>

<details>
<summary> test3 </summary>
123
</details>    

Screen Shot 2021-05-01 at 3 08 34 PM

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions