Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ Debug
*.minime-options
*.zip
*.nupkg

_ReSharper.*
16 changes: 13 additions & 3 deletions MarkdownDeep/MardownDeep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Text;
using System.Text.RegularExpressions;

namespace MarkdownDeep
{

Expand Down Expand Up @@ -67,6 +68,11 @@ public string Transform(string str)
// Transform a string
public string Transform(string str, out Dictionary<string, LinkDefinition> definitions)
{
if (EasyLineBreaks)
{
str = Regex.Replace(str, @"^([\w\*\>\<\[][^\r\n]*)(?=\r?\n[\w\*\>\<\[].*$)", "$1 ", RegexOptions.Multiline);
}

// Build blocks
var blocks = ProcessBlocks(str);

Expand Down Expand Up @@ -200,7 +206,11 @@ public string Transform(string str, out Dictionary<string, LinkDefinition> defin

// Done
return sb.ToString();
}
}

///<summary>Set to true to automatically have line breaks entered by the user converted into br tags without
/// needing double spaces</summary>
public bool EasyLineBreaks { get; set; }

public int SummaryLength
{
Expand Down
Loading