@@ -33,6 +33,7 @@ private void Render(List<CodeLine> list, IEnumerable<CodeFileToken> node, bool s
3333 {
3434 var stringBuilder = new StringBuilder ( ) ;
3535 string currentId = null ;
36+ string currentCrossLangId = null ;
3637 string currentTableId = null ;
3738 bool isDocumentationRange = false ;
3839 bool isHiddenApiToken = false ;
@@ -57,7 +58,7 @@ private void Render(List<CodeLine> list, IEnumerable<CodeFileToken> node, bool s
5758 switch ( token . Kind )
5859 {
5960 case CodeFileTokenKind . Newline :
60- CaptureCodeLine ( list , sections , nodesInProcess , ref section , stringBuilder , ref lineNumber , ref leafSectionPlaceHolderNumber , ref currentId , isDocumentationRange , isHiddenApiToken ) ;
61+ CaptureCodeLine ( list , sections , nodesInProcess , ref section , stringBuilder , ref lineNumber , ref leafSectionPlaceHolderNumber , ref currentId , ref currentCrossLangId , isDocumentationRange , isHiddenApiToken ) ;
6162 break ;
6263
6364 case CodeFileTokenKind . DocumentRangeStart :
@@ -97,6 +98,7 @@ private void Render(List<CodeLine> list, IEnumerable<CodeFileToken> node, bool s
9798 case CodeFileTokenKind . FoldableSectionHeading :
9899 nodesInProcess . Push ( SectionType . Heading ) ;
99100 currentId = ( token . DefinitionId != null ) ? token . DefinitionId : currentId ;
101+ currentCrossLangId = ( token . CrossLanguageDefinitionId != null ) ? token . CrossLanguageDefinitionId : currentCrossLangId ;
100102 RenderToken ( token , stringBuilder , isDeprecatedToken , isHiddenApiToken ) ;
101103 break ;
102104
@@ -149,7 +151,7 @@ private void Render(List<CodeLine> list, IEnumerable<CodeFileToken> node, bool s
149151 stringBuilder . Append ( "</strong></li>" ) ;
150152 stringBuilder . Append ( "</ul>" ) ;
151153 tableColumnCount . Curr = 0 ;
152- CaptureCodeLine ( list , sections , nodesInProcess , ref section , stringBuilder , ref lineNumber , ref leafSectionPlaceHolderNumber , ref currentId , isDocumentationRange , isHiddenApiToken ) ;
154+ CaptureCodeLine ( list , sections , nodesInProcess , ref section , stringBuilder , ref lineNumber , ref leafSectionPlaceHolderNumber , ref currentId , ref currentCrossLangId , isDocumentationRange , isHiddenApiToken ) ;
153155 }
154156 else
155157 {
@@ -186,7 +188,7 @@ private void Render(List<CodeLine> list, IEnumerable<CodeFileToken> node, bool s
186188 if ( tableColumnCount . Curr == 0 )
187189 {
188190 stringBuilder . Append ( "</ul>" ) ;
189- CaptureCodeLine ( list , sections , nodesInProcess , ref section , stringBuilder , ref lineNumber , ref leafSectionPlaceHolderNumber , ref currentId , isDocumentationRange , isHiddenApiToken ) ;
191+ CaptureCodeLine ( list , sections , nodesInProcess , ref section , stringBuilder , ref lineNumber , ref leafSectionPlaceHolderNumber , ref currentId , ref currentCrossLangId , isDocumentationRange , isHiddenApiToken ) ;
190192 }
191193 break ;
192194
@@ -208,6 +210,7 @@ private void Render(List<CodeLine> list, IEnumerable<CodeFileToken> node, bool s
208210
209211 default :
210212 currentId = ( token . DefinitionId != null ) ? token . DefinitionId : currentId ;
213+ currentCrossLangId = ( token . CrossLanguageDefinitionId != null ) ? token . CrossLanguageDefinitionId : currentCrossLangId ;
211214 RenderToken ( token , stringBuilder , isDeprecatedToken , isHiddenApiToken ) ;
212215 break ;
213216 }
@@ -228,11 +231,11 @@ protected virtual void StartDocumentationRange(StringBuilder stringBuilder) { }
228231 protected virtual void CloseDocumentationRange ( StringBuilder stringBuilder ) { }
229232
230233 private void CaptureCodeLine ( List < CodeLine > list , Dictionary < int , TreeNode < CodeLine > > sections , Stack < SectionType > nodesInProcess ,
231- ref TreeNode < CodeLine > section , StringBuilder stringBuilder , ref int lineNumber , ref int leafSectionPlaceHolderNumber , ref string currentId ,
234+ ref TreeNode < CodeLine > section , StringBuilder stringBuilder , ref int lineNumber , ref int leafSectionPlaceHolderNumber , ref string currentId , ref string currentCrossLangId ,
232235 bool isDocumentationRange = false , bool isHiddenApiToken = false )
233236 {
234237 int ? sectionKey = ( nodesInProcess . Count > 0 && section == null ) ? sections . Count : null ;
235- CodeLine codeLine = new CodeLine ( stringBuilder . ToString ( ) , currentId , String . Empty , ++ lineNumber , sectionKey , isDocumentation : isDocumentationRange , isHiddenApi : isHiddenApiToken ) ;
238+ CodeLine codeLine = new CodeLine ( stringBuilder . ToString ( ) , currentId , currentCrossLangId , String . Empty , ++ lineNumber , sectionKey , isDocumentation : isDocumentationRange , isHiddenApi : isHiddenApiToken ) ;
236239 if ( leafSectionPlaceHolderNumber != 0 )
237240 {
238241 lineNumber += leafSectionPlaceHolderNumber - 1 ;
0 commit comments