@@ -30,8 +30,8 @@ namespace DocGenerator.AsciiDoc
3030 public class GeneratedAsciidocVisitor : NoopVisitor
3131 {
3232 private static readonly Dictionary < string , string > Ids = new Dictionary < string , string > ( ) ;
33-
3433 private readonly FileInfo _destination ;
34+
3535 private readonly FileInfo _source ;
3636 private readonly Dictionary < string , Project > _projects ;
3737 private int _topSectionTitleLevel ;
@@ -76,12 +76,13 @@ public override void VisitDocument(Document document)
7676
7777 if ( ! document . Attributes . Any ( a => a . Name == "ref_current" ) )
7878 {
79- _newDocument . Attributes . Add ( new AttributeEntry ( "ref_current" , "https://www.elastic.co/guide/en/elasticsearch/reference/2.4" ) ) ;
79+ _newDocument . Attributes . Add ( new AttributeEntry ( "ref_current" ,
80+ $ "https://www.elastic.co/guide/en/elasticsearch/reference/{ Program . DocVersion } ") ) ;
8081 }
8182
8283 if ( document . Attributes . All ( a => a . Name != "xpack_current" ) )
8384 {
84- _newDocument . Attributes . Add ( new AttributeEntry ( "xpack_current" , "https://www.elastic.co/guide/en/x-pack/2.4 " ) ) ;
85+ _newDocument . Attributes . Add ( new AttributeEntry ( "xpack_current" , "https://www.elastic.co/guide/en/x-pack/{Program.DocVersion} " ) ) ;
8586 }
8687
8788 var github = "https://github.com/elastic/elasticsearch-net" ;
@@ -96,7 +97,9 @@ public override void VisitDocument(Document document)
9697 _newDocument . Attributes . Add ( new AttributeEntry ( "nuget" , "https://www.nuget.org/packages" ) ) ;
9798 }
9899
99- var originalFile = Regex . Replace ( _source . FullName . Replace ( "\\ " , "/" ) , @"^(.*Tests/)" , $ "{ github } /tree/2.x/src/Tests/") ;
100+ var originalFile = Regex . Replace ( _source . FullName . Replace ( "\\ " , "/" ) , @"^(.*Tests/)" ,
101+ $ "{ github } /tree/{ Program . BranchName } /src/Tests/") ;
102+
100103 _newDocument . Insert ( 0 , new Comment
101104 {
102105 Style = CommentStyle . MultiLine ,
0 commit comments