w3cWPUB static method
Implementation
static Future<MediaType?> w3cWPUB(SnifferContext context) async {
// Somehow, [JSONObject] can't access JSON-LD keys such as `@context`.
String content = (await context.contentAsString()) ?? "";
if (content.contains("@context") &&
content.contains("https://www.w3.org/ns/wp-context")) {
return MediaType.w3cWpubManifest;
}
return null;
}