Epub 3.2 Collection Tag support (#308)
* Hooked up logic for collections based on EPUB3.2 Spec and Fixed improper tags in EPUBs since it is XML and we are using HTML to parse it. * Fixed a bug with src:url url replacing so that it's much cleaner regex
This commit is contained in:
parent
584348c6ad
commit
d02d2d3cb5
3 changed files with 44 additions and 6 deletions
|
|
@ -15,7 +15,7 @@ namespace API.Parser
|
|||
public const string ArchiveFileExtensions = @"\.cbz|\.zip|\.rar|\.cbr|\.tar.gz|\.7zip|\.7z|.cb7";
|
||||
public const string BookFileExtensions = @"\.epub";
|
||||
public const string ImageFileExtensions = @"^(\.png|\.jpeg|\.jpg)";
|
||||
public static readonly Regex FontSrcUrlRegex = new Regex("(src:url\\(\"?'?)([a-z0-9/\\._]+)(\"?'?\\))", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
public static readonly Regex FontSrcUrlRegex = new Regex(@"(src:url\(.{1})" + "([^\"']*)" + @"(.{1}\))", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
public static readonly Regex CssImportUrlRegex = new Regex("(@import\\s[\"|'])(?<Filename>[\\w\\d/\\._-]+)([\"|'];?)", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
||||
private static readonly string XmlRegexExtensions = @"\.xml";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue