Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

Commit 3b1981c

Browse files
author
N. Taylor Mullen
committed
Addressed code review comments.
1 parent e77bdc7 commit 3b1981c

File tree

7 files changed

+6
-10
lines changed

7 files changed

+6
-10
lines changed

src/Microsoft.AspNet.Razor.Runtime/TagHelpers/IReadOnlyTagHelperAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public interface IReadOnlyTagHelperAttribute : IEquatable<IReadOnlyTagHelperAttr
2121
object Value { get; }
2222

2323
/// <summary>
24-
/// Indicates whether the attribute is minimized or not.
24+
/// Gets an indication whether the attribute is minimized or not.
2525
/// </summary>
2626
/// <remarks>If <c>true</c>, <see cref="Value"/> will be ignored.</remarks>
2727
bool Minimized { get; }

src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperAttribute.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,11 @@ public TagHelperAttribute(string name, object value)
4242
public object Value { get; set; }
4343

4444
/// <summary>
45-
/// Gets or sets the value indicating if the attribute is minimized.
45+
/// Gets or sets an indication whether the attribute is minimized or not.
4646
/// </summary>
4747
/// <remarks>If <c>true</c>, <see cref="Value"/> will be ignored.</remarks>
4848
public bool Minimized { get; set; }
4949

50-
5150
/// <summary>
5251
/// Converts the specified <paramref name="value"/> into a <see cref="TagHelperAttribute"/>.
5352
/// </summary>

src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpTagHelperCodeRenderer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ private void RenderUnboundHTMLAttributes(IEnumerable<KeyValuePair<string, Chunk>
353353
_tagHelperContext.ExecutionContextAddHtmlAttributeMethodName)
354354
.WriteStringLiteral(htmlAttribute.Key);
355355

356-
// If we have a minimized attribute we don't want to provide a value
356+
// If we have a minimized attribute there is no value
357357
if (attributeValue != null)
358358
{
359359
_writer.WriteParameterSeparator()

src/Microsoft.AspNet.Razor/Parser/HtmlMarkupParser.Block.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,6 @@ private void BeforeAttribute()
472472
}
473473

474474
// Minimized attribute
475-
// Need to modify this code to account for space inbetween equals when
476-
// https://github.com/aspnet/Razor/issues/123 is completed.
477475
if (!At(HtmlSymbolType.Equals))
478476
{
479477
// Output anything prior to the attribute, in most cases this will be the tag name:

src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperBlockRewriter.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ private static bool TryParseSpan(
241241
}
242242

243243
// If we're not after an equal then we should treat the value as if it were a minimized attribute.
244-
// Aka null value.
245244
var attributeValueBuilder = afterEquals ? builder : null;
246245
attribute = CreateMarkupAttribute(name, attributeValueBuilder, attributeValueTypes);
247246

test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/TagHelperExecutionContextTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public void AllAttributes_IgnoresCase(string originalName, string updatedName)
181181
}
182182

183183
[Fact]
184-
public void AddHtmlAttribute_MaintainsHTMLAttributes_Unminimized()
184+
public void AddHtmlAttribute_MaintainsHTMLAttributes()
185185
{
186186
// Arrange
187187
var executionContext = new TagHelperExecutionContext("p", selfClosing: false);
@@ -225,7 +225,7 @@ public void AddHtmlAttribute_MaintainsHTMLAttributes_Minimized()
225225
}
226226

227227
[Fact]
228-
public void AddHtmlAttribute_MaintainsHTMLAttributes_Mixed()
228+
public void AddHtmlAttribute_MaintainsHTMLAttributes_SomeMinimized()
229229
{
230230
// Arrange
231231
var executionContext = new TagHelperExecutionContext("input", selfClosing: true);

test/Microsoft.AspNet.Razor.Test/Framework/ParserTestBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ private static void EvaluateTagHelperAttribute(ErrorCollector collector,
339339

340340
if (actual.Value == null && expected.Value == null)
341341
{
342-
collector.AddMessage("{0} - PASSED :: Attribute values match", expected.Key);
342+
collector.AddMessage("{0} - PASSED :: Minimized attribute values match", expected.Key);
343343
}
344344
else
345345
{

0 commit comments

Comments
 (0)