File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
src/Elastic.Markdown/Myst/Directives
tests/Elastic.Markdown.Tests/Directives Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,8 @@ public override void FinalizeAndValidate(ParserContext context)
2828 if ( ! SemVersion . TryParse ( tokens [ 0 ] , out var version ) )
2929 {
3030 var numbers = tokens [ 0 ] . Split ( '.' , RemoveEmptyEntries ) ;
31- if ( numbers . Length != 2 || ! SemVersion . TryParse ( $ "{ numbers [ 0 ] } .{ numbers [ 1 ] } ", out version ) )
31+ if ( numbers . Length != 2 || ! SemVersion . TryParse ( $ "{ numbers [ 0 ] } .{ numbers [ 1 ] } .0 ", out version ) )
3232 EmitError ( context , $ "'{ tokens [ 0 ] } ' is not a valid version") ;
33- return ;
3433 }
3534
3635 Version = version ;
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ public class VersionDeprectatedTests(ITestOutputHelper output) : VersionTests(ou
5454public abstract class VersionValidationTests ( ITestOutputHelper output , string version ) : DirectiveTest < VersionBlock > ( output ,
5555$$ """
5656```{versionchanged} {{ version }} more information
57- Version brief summary
57+ Version brief summary
5858```
5959A regular paragraph.
6060"""
@@ -64,6 +64,9 @@ public class SimpleVersion(ITestOutputHelper output) : VersionValidationTests(ou
6464{
6565 [ Fact ]
6666 public void SetsVersion ( ) => Block ! . Version . Should ( ) . Be ( new SemVersion ( 7 , 17 , 0 ) ) ;
67+
68+ [ Fact ]
69+ public void HasNoError ( ) => Collector . Diagnostics . Should ( ) . BeEmpty ( ) ;
6770}
6871
6972public class MajorVersionOnly ( ITestOutputHelper output ) : VersionValidationTests ( output , "8" )
You can’t perform that action at this time.
0 commit comments