From ef20ae997572d2df72dd716c51f7353fcdef003f Mon Sep 17 00:00:00 2001 From: Tobias Klika Date: Thu, 16 Jan 2014 11:43:21 +0100 Subject: [PATCH] add PrettyPrint option --- CHANGELOG.md | 4 ++++ ReadSharp/Models/ReadOptions.cs | 11 ++++++++++- ReadSharp/Properties/AssemblyInfo.cs | 4 ++-- ReadSharp/Reader.cs | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9507049..1297e06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### 4.2.3 + +- add PrettyPrint option + ### 4.2.2 - use encoding found in HTTP headers in first iteration (fixes [issue #6](https://github.com/ceee/ReadSharp/issues/6)) diff --git a/ReadSharp/Models/ReadOptions.cs b/ReadSharp/Models/ReadOptions.cs index 1660445..a67e41a 100644 --- a/ReadSharp/Models/ReadOptions.cs +++ b/ReadSharp/Models/ReadOptions.cs @@ -27,6 +27,14 @@ namespace ReadSharp /// public bool UseDeepLinks { get; set; } + /// + /// Determines whether the output will be formatted. + /// + /// + /// true if [pretty print]; otherwise, false. + /// + public bool PrettyPrint { get; set; } + /// /// Creates the default options. /// @@ -37,7 +45,8 @@ namespace ReadSharp { HasHeaderTags = false, HasNoHeadline = false, - UseDeepLinks = false + UseDeepLinks = false, + PrettyPrint = false }; } } diff --git a/ReadSharp/Properties/AssemblyInfo.cs b/ReadSharp/Properties/AssemblyInfo.cs index 1c4b511..fc27595 100644 --- a/ReadSharp/Properties/AssemblyInfo.cs +++ b/ReadSharp/Properties/AssemblyInfo.cs @@ -22,5 +22,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.2.2")] -[assembly: AssemblyFileVersion("4.2.2")] \ No newline at end of file +[assembly: AssemblyVersion("4.2.3")] +[assembly: AssemblyFileVersion("4.2.3")] \ No newline at end of file diff --git a/ReadSharp/Reader.cs b/ReadSharp/Reader.cs index e97759f..2be19e5 100644 --- a/ReadSharp/Reader.cs +++ b/ReadSharp/Reader.cs @@ -223,7 +223,7 @@ namespace ReadSharp { BodyOnly = !options.HasHeaderTags, NoHeadline = options.HasNoHeadline, - PrettyPrint = true, + PrettyPrint = options.PrettyPrint, DontIncludeContentTypeMetaElement = true, DontIncludeMobileSpecificMetaElements = true, DontIncludeDocTypeMetaElement = false,