Skip to content

Commit

Permalink
Renamed WriteHtmlAttribute methods to WriteAttribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei15193 committed Jun 22, 2018
1 parent e82350e commit 93e2822
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Mup/HtmlWriterVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ protected internal override void VisitEmphasisEnding()
protected internal override void VisitHyperlinkBeginning(string destination)
{
BeginElementWithoutIndent("a");
WriteHtmlAttribute("href", destination);
WriteAttribute("href", destination);
}

/// <summary>Visits the ending of a hyperlink.</summary>
Expand All @@ -311,9 +311,9 @@ protected internal override void VisitHyperlinkEnding()
protected internal override void VisitImage(string source, string alternativeText)
{
BeginElementWithoutIndent("img");
WriteHtmlAttribute("src", source);
WriteAttribute("src", source);
if (!IsNullOrWhiteSpace(alternativeText))
WriteHtmlAttribute("alt", alternativeText);
WriteAttribute("alt", alternativeText);
EndElement();
}

Expand Down Expand Up @@ -443,7 +443,7 @@ protected void EndElementWithoutIndent()
/// <exception cref="InvalidOperationException">
/// Thrown when content has been written inside the HTML element or there is no HTML element started.
/// </exception>
protected void WriteHtmlAttribute(string attributeName)
protected void WriteAttribute(string attributeName)
{
if (_openElements.Count == 0)
throw new InvalidOperationException("There are no elements started.");
Expand All @@ -460,7 +460,7 @@ protected void WriteHtmlAttribute(string attributeName)
/// <exception cref="InvalidOperationException">
/// Thrown when content has been written inside the HTML element or there is no HTML element started.
/// </exception>
protected void WriteHtmlAttribute(string attributeName, string attributeValue)
protected void WriteAttribute(string attributeName, string attributeValue)
{
if (_openElements.Count == 0)
throw new InvalidOperationException("There are no elements started.");
Expand Down

0 comments on commit 93e2822

Please sign in to comment.