Skip to content

Add 'style' tag processing #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 22, 2022
Merged

Add 'style' tag processing #10

merged 2 commits into from
Mar 22, 2022

Conversation

luzmane
Copy link
Contributor

@luzmane luzmane commented Mar 22, 2022

Add processing of the tag 'style' original spec contains. Inside fb2 book, it looks like this:
<style name="somestyle">some string</style>. Without this fix, if the book contains this tag, the following exception will be thrown:

System.ArgumentNullException: The empty string '' is not a valid local name. (Parameter 'name')
   at System.Xml.XmlConvert.VerifyNCName(String name, ExceptionType exceptionType)
   at System.Xml.XmlConvert.VerifyNCName(String name)
   at System.Xml.Linq.XName..ctor(XNamespace ns, String localName)
   at System.Xml.Linq.XNamespace.GetName(String localName, Int32 index, Int32 count)
   at System.Xml.Linq.XNamespace.GetName(String localName)
   at System.Xml.Linq.XNamespace.op_Addition(XNamespace ns, String localName)
   at FB2Library.Elements.SimpleText.ToXML() in FB2Library\Elements\SimpleText.cs:line 218
   at FB2Library.Elements.ParagraphItem.ToXML() in FB2Library\Elements\ParagraphItem.cs:line 180
   at FB2Library.Elements.SectionItem.ToXML() in FB2Library\Elements\SectionItem.cs:line 320
   at FB2Library.Elements.BodyItem.ToXML() in FB2Library\Elements\BodyItem.cs:line 164
   at FB2Library.FB2File.ToXML(Boolean bExportHeaderOnly) in FB2Library\FB2File.cs:line 420

@wcoder wcoder added this to the vNext milestone Mar 22, 2022
@wcoder wcoder merged commit d8c7d9d into wcoder:master Mar 22, 2022
@wcoder
Copy link
Owner

wcoder commented Mar 22, 2022

Thanks a lot!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants