@@ -30,8 +30,8 @@ namespace DocGenerator.AsciiDoc
30
30
public class GeneratedAsciidocVisitor : NoopVisitor
31
31
{
32
32
private static readonly Dictionary < string , string > Ids = new Dictionary < string , string > ( ) ;
33
-
34
33
private readonly FileInfo _destination ;
34
+
35
35
private readonly FileInfo _source ;
36
36
private readonly Dictionary < string , Project > _projects ;
37
37
private int _topSectionTitleLevel ;
@@ -76,12 +76,13 @@ public override void VisitDocument(Document document)
76
76
77
77
if ( ! document . Attributes . Any ( a => a . Name == "ref_current" ) )
78
78
{
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 } ") ) ;
80
81
}
81
82
82
83
if ( document . Attributes . All ( a => a . Name != "xpack_current" ) )
83
84
{
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} " ) ) ;
85
86
}
86
87
87
88
var github = "https://github.com/elastic/elasticsearch-net" ;
@@ -96,7 +97,9 @@ public override void VisitDocument(Document document)
96
97
_newDocument . Attributes . Add ( new AttributeEntry ( "nuget" , "https://www.nuget.org/packages" ) ) ;
97
98
}
98
99
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
+
100
103
_newDocument . Insert ( 0 , new Comment
101
104
{
102
105
Style = CommentStyle . MultiLine ,
0 commit comments