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
40
40
'|<span class="confluence-embedded-file-wrapper">.*</span>| ' ,
41
41
'|<div class="drop-zone-empty-text">.*</div>|s ' ,
42
42
'|<li class="drop-zone-text hidden">.*</li>|s ' ,
43
+ '|<a class="confluence-userlink url fn".*</a>| ' ,
43
44
'|<img .* src="data:.*/>| ' ,
44
45
],
45
46
'' ,
Original file line number Diff line number Diff line change @@ -26,6 +26,14 @@ public function testHtmlFile2Markdown()
26
26
$ this ->assertEquals ("你好 \n== " , $ markdown );
27
27
}
28
28
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
+
29
37
public function testParsePagesTree ()
30
38
{
31
39
$ document = new DOMDocument ();
You can’t perform that action at this time.
0 commit comments