mirror of
https://github.com/tnypxl/rollup.git
synced 2025-12-15 23:13:22 +00:00
fix: improve URL parsing and title extraction in getFilenameFromContent
This commit is contained in:
@@ -76,7 +76,9 @@ func TestGetFilenameFromContent(t *testing.T) {
|
||||
{"No title here", "http://example.com/page", "example_com_page.rollup.md", false},
|
||||
{"<title> Trim Me </title>", "http://example.com", "Trim_Me.rollup.md", false},
|
||||
{"<title></title>", "http://example.com", "example_com.rollup.md", false},
|
||||
{"<title> </title>", "http://example.com", "example_com.rollup.md", false},
|
||||
{"Invalid URL", "not a valid url", "", true},
|
||||
{"No host", "http://", "", true},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
||||
Reference in New Issue
Block a user