reverse bodyOnly
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user