我正在处理一个非常大的 HTML 文件,它在正文部分有很多内容。是否有可以合并多个 HTML 文件的 HTML 的“编译器”或合并应用程序?
例子:
.htm
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
</head>
<body>
INCLUDE "b.htm"
<div>
INCLUDE "c.htm"
</div>
</body>
</html>
b.htm
some text
<a href="#">Link</a>
INCLUDE "c.htm"
c.htm
more <span>text</span>
将合并为:
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
</head>
<body>
some text
<a href="#">Link</a>
more <span>text</span>
<div>
more <span>text</span>
</div>
</body>
</html>