File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ internal static string EndOfLine(string xmlCommentEndOfLine)
219
219
private const string CodeTagPattern = @"<c>(?<display>.+?)</c>" ;
220
220
private const string MultilineCodeTagPattern = @"<code>(?<display>.+?)</code>" ;
221
221
private const string ParaTagPattern = @"<para>(?<display>.+?)</para>" ;
222
- private const string HrefPattern = @"<see href=\""(. *)\"">(.*) <\/see>" ;
222
+ private const string HrefPattern = @"<see\s+ href=\""([^""] *)\"">\s* (.*?)\s* <\/see>" ;
223
223
private const string BrPattern = @"(<br ?\/?>)" ; // handles <br>, <br/>, <br />
224
224
private const string LineBreaksPattern = @"\r?\n" ;
225
225
private const string DoubleUpLineBreaksPattern = @"(\r?\n){2,}" ;
@@ -237,7 +237,7 @@ internal static string EndOfLine(string xmlCommentEndOfLine)
237
237
[ GeneratedRegex ( ParaTagPattern , RegexOptions . Singleline ) ]
238
238
private static partial Regex ParaTag ( ) ;
239
239
240
- [ GeneratedRegex ( HrefPattern ) ]
240
+ [ GeneratedRegex ( HrefPattern , RegexOptions . Singleline ) ]
241
241
private static partial Regex HrefTag ( ) ;
242
242
243
243
[ GeneratedRegex ( BrPattern ) ]
Original file line number Diff line number Diff line change @@ -142,6 +142,19 @@ public void Humanize_HumanizesInlineTags(
142
142
Assert . Equal ( expectedOutput , output , false , true ) ;
143
143
}
144
144
145
+ [ Fact ]
146
+ public void Humanize_SeeMultiLineTag ( )
147
+ {
148
+ const string input = @"
149
+ <see href=""https://www.iso.org/iso-4217-currency-codes.html"">
150
+ ISO currency code
151
+ </see>" ;
152
+
153
+ var output = XmlCommentsTextHelper . Humanize ( input ) ;
154
+
155
+ Assert . Equal ( "[ISO currency code](https://www.iso.org/iso-4217-currency-codes.html)" , output , false , true ) ;
156
+ }
157
+
145
158
[ Theory ]
146
159
[ InlineData ( "\r \n " ) ]
147
160
[ InlineData ( "\n " ) ]
You can’t perform that action at this time.
0 commit comments