File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ public function htmlFile2Markdown(string $filename): string
4040'|<span class="confluence-embedded-file-wrapper">.*</span>| ' ,
4141'|<div class="drop-zone-empty-text">.*</div>|s ' ,
4242'|<li class="drop-zone-text hidden">.*</li>|s ' ,
43+ '|<a class="confluence-userlink url fn".*</a>| ' ,
4344'|<img .* src="data:.*/>| ' ,
4445 ],
4546'' ,
Original file line number Diff line number Diff line change @@ -26,6 +26,14 @@ public function testHtmlFile2Markdown()
2626$ this ->assertEquals ("你好 \n== " , $ markdown );
2727 }
2828
29+ public function testHtmlFile2MarkdownUserLink ()
30+ {
31+ $ confluence = new Confluence ();
32+ $ markdown = file_get_contents ($ this ->dataDir . 'confluence/space1/image-demo_65619.md ' );
33+ $ newMarkdown = $ confluence ->htmlFile2Markdown ($ this ->dataDir . 'confluence/space1/image-demo_65619.html ' );
34+ $ this ->assertEquals (trim ($ markdown ), $ newMarkdown );
35+ }
36+
2937public function testParsePagesTree ()
3038{
3139$ document = new DOMDocument ();
You can’t perform that action at this time.
0 commit comments