Skip to content

Commit

Permalink
Few CA warnings fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Knagis committed Jan 12, 2015
1 parent 6231ddf commit 9756891
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions CommonMark/Formatter/HtmlPrinter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ private static void BlocksToHtmlInner(HtmlTextWriter writer, Block block, Common
/// Writes the inline list to the given writer as plain text (without any HTML tags).
/// </summary>
/// <seealso href="https://github.com/jgm/CommonMark/issues/145"/>
private static void InlinesToPlainText(HtmlTextWriter writer, Inline inline, CommonMarkSettings settings, Stack<InlineStackEntry> stack)
private static void InlinesToPlainText(HtmlTextWriter writer, Inline inline, Stack<InlineStackEntry> stack)
{
bool withinLink = false;
bool stackWithinLink = false;
Expand Down Expand Up @@ -489,7 +489,7 @@ private static void InlinesToHtml(HtmlTextWriter writer, Inline inline, CommonMa
EscapeUrl(inline.TargetUrl, writer);

writer.Write("\" alt=\"");
InlinesToPlainText(writer, inline.FirstChild, settings, stack);
InlinesToPlainText(writer, inline.FirstChild, stack);
writer.Write("\"");
if (!string.IsNullOrEmpty(inline.LiteralContent))
{
Expand Down
1 change: 1 addition & 0 deletions CommonMark/Formatter/HtmlTextWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ internal class HtmlTextWriter : System.IO.TextWriter
private char[] _buffer = new char[256];

public HtmlTextWriter(System.IO.TextWriter inner)
: base(System.Globalization.CultureInfo.InvariantCulture)
{
this._inner = inner;

Expand Down
4 changes: 2 additions & 2 deletions CommonMark/Parser/InlineMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ private static Inline HandleTilde(Subject subj)
var istack = InlineStack.FindMatchingOpener(subj.LastPendingInline, InlineStack.InlineStackPriority.Emphasis, '~', out can_close);
if (istack != null)
{
MatchTildeStack(istack, subj, numdelims, null);
MatchTildeStack(istack, subj, null);

// if the closer was not fully used, move back a char or two and try again.
if (numdelims > 2)
Expand Down Expand Up @@ -490,7 +490,7 @@ private static Inline HandleTilde(Subject subj)
return inlText;
}

internal static void MatchTildeStack(InlineStack opener, Subject subj, int closingDelimeterCount, InlineStack closer)
internal static void MatchTildeStack(InlineStack opener, Subject subj, InlineStack closer)
{
// calculate the actual number of delimeters used from this closer

Expand Down
2 changes: 1 addition & 1 deletion CommonMark/Parser/InlineStack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public static void PostProcessInlineStack(Subject subj, InlineStack first, Inlin
}
else if (iopener.Delimeter == '~')
{
InlineMethods.MatchTildeStack(iopener, subj, istack.DelimeterCount, istack);
InlineMethods.MatchTildeStack(iopener, subj, istack);
if (istack.DelimeterCount > 1)
retry = true;
}
Expand Down
8 changes: 4 additions & 4 deletions CommonMark/Syntax/StringContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ public void WriteTo(System.IO.TextWriter writer)
/// <summary>
/// Checks if the first character of the string content matches the given.
/// </summary>
public bool StartsWith(char c)
public bool StartsWith(char character)
{
for (var i = 0; i < this._partCounter; i++)
{
if (this._parts[i].Length != 0)
return this._parts[i].Source[this._parts[i].StartIndex] == c;
return this._parts[i].Source[this._parts[i].StartIndex] == character;
}

return false;
Expand Down Expand Up @@ -145,13 +145,13 @@ public void TrimStart(int charactersToRemove)
/// Reports the zero-based index of the first occurrence of the specified character in this instance.
/// </summary>
/// <returns>The zero-based index position of value if that character is found, or -1 if it is not.</returns>
public int IndexOf(char c)
public int IndexOf(char character)
{
int res = -1;
var index = 0;
for (var i = 0; i < this._partCounter; i++)
{
res = this._parts[i].Source.IndexOf(c, this._parts[i].StartIndex, this._parts[i].Length);
res = this._parts[i].Source.IndexOf(character, this._parts[i].StartIndex, this._parts[i].Length);
if (res != -1)
{
res = res - this._parts[i].StartIndex + index;
Expand Down

0 comments on commit 9756891

Please sign in to comment.