diff --git a/Core/Formatter.cs b/Core/Formatter.cs
index 598ed56..40a3706 100644
--- a/Core/Formatter.cs
+++ b/Core/Formatter.cs
@@ -367,7 +367,13 @@ namespace ScrewTurn.Wiki {
sb.Insert(match.Index, GenerateList(lines, 0, 0, ref d) + "\n");
}
catch {
- sb.Insert(match.Index, @"FORMATTER ERROR (Malformed List)");
+ if(!bareBones) {
+ sb.Insert(match.Index, @"FORMATTER ERROR (Malformed List)
");
+ }
+ else {
+ sb.Insert(match.Index, match);
+ end = match.Index + match.Length;
+ }
}
}
ComputeNoWiki(sb.ToString(), ref noWikiBegin, ref noWikiEnd);
@@ -511,9 +517,13 @@ namespace ScrewTurn.Wiki {
sb.Insert(match.Index, img.ToString());
}
else {
- sb.Insert(match.Index, @"FORMATTER ERROR (Malformed Image Tag)");
+ if(!bareBones) sb.Insert(match.Index, @"FORMATTER ERROR (Malformed Image Tag)");
+ else {
+ sb.Insert(match.Index, match);
+ end = match.Index + match.Length;
+ }
+ done = true;
}
- done = true;
}
}
else if(tmp.ToLowerInvariant().StartsWith("attachment:")) {
@@ -1732,6 +1742,7 @@ namespace ScrewTurn.Wiki {
}
else if(targetUrl.Contains(":") || targetUrl.ToLowerInvariant().Contains("%3a") || targetUrl.Contains("&") || targetUrl.Contains("%26")) {
sb.Append(@"FORMATTER ERROR ("":"" and ""&"" not supported in Page Names)");
+
}
else {
// The link points to a wiki page
@@ -2131,7 +2142,7 @@ namespace ScrewTurn.Wiki {
private static string BuildTable(string table) {
// Proceed line-by-line, ignoring the first and last one
string[] lines = table.Split(new char[] { '\n' }, StringSplitOptions.RemoveEmptyEntries);
- if(lines.Length < 3) {
+ if(lines.Length < 3) {
return "FORMATTER ERROR (Malformed Table)";
}
StringBuilder sb = new StringBuilder();
@@ -2512,6 +2523,8 @@ namespace ScrewTurn.Wiki {
else {
string formatterErrorString = @"FORMATTER ERROR (Transcluded inexistent page or this same page)";
sb.Insert(match.Index, formatterErrorString);
+ sb.Insert(match.Index, match);
+
}