feat: implement CSS enumeration through OPF directory when missing from manifest (#2148)
This commit is contained in:
@@ -129,6 +129,8 @@ bool hasTxtExtension(std::string_view fileName) { return checkFileExtension(file
|
||||
|
||||
bool hasMarkdownExtension(std::string_view fileName) { return checkFileExtension(fileName, ".md"); }
|
||||
|
||||
bool hasCssExtension(std::string_view fileName) { return checkFileExtension(fileName, ".css"); }
|
||||
|
||||
std::string extractFolderPath(const std::string& filePath) {
|
||||
const auto lastSlash = filePath.find_last_of('/');
|
||||
if (lastSlash == std::string::npos || lastSlash == 0) {
|
||||
|
||||
@@ -58,6 +58,11 @@ inline bool hasTxtExtension(const String& fileName) {
|
||||
// Check for .md extension (case-insensitive)
|
||||
bool hasMarkdownExtension(std::string_view fileName);
|
||||
|
||||
// Check for .css extension (case-insensitive)
|
||||
bool hasCssExtension(std::string_view fileName);
|
||||
inline bool hasCssExtension(const String& fileName) {
|
||||
return hasCssExtension(std::string_view{fileName.c_str(), fileName.length()});
|
||||
}
|
||||
std::string extractFolderPath(const std::string& filePath);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user