reverse bodyOnly

This commit is contained in:
2013-12-25 21:08:21 +01:00
parent 5c73d51068
commit 6987384e81
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ namespace ReadSharp.Tests
Article result = await reader.Read(new Uri("http://frontendplay.com/story/4/http-caching-demystified-part-2-implementation"), new ReadOptions()
{
HasNoHeadline = true,
HasOnlyBody = false
HasHeaderTags = true
});
Assert.Contains("<!DOCTYPE html>", result.Content);
+3 -3
View File
@@ -4,12 +4,12 @@ namespace ReadSharp
public class ReadOptions
{
/// <summary>
/// Is only the body is returned
/// Are header tags and Doctype returned
/// </summary>
/// <value>
/// <c>true</c> if [has only body]; otherwise, <c>false</c>.
/// </value>
public bool HasOnlyBody { get; set; }
public bool HasHeaderTags { get; set; }
/// <summary>
/// Is no headline (h1) is included in generated HTML
@@ -35,7 +35,7 @@ namespace ReadSharp
{
return new ReadOptions()
{
HasOnlyBody = true,
HasHeaderTags = false,
HasNoHeadline = false,
UseDeepLinks = false
};
+1 -1
View File
@@ -214,7 +214,7 @@ namespace ReadSharp
Url = uri.ToString(),
DomSerializationParams = new DomSerializationParams()
{
BodyOnly = options.HasOnlyBody,
BodyOnly = !options.HasHeaderTags,
NoHeadline = options.HasNoHeadline,
PrettyPrint = true,
DontIncludeContentTypeMetaElement = true,