@@ -68,6 +68,7 @@ export class YANGModule implements OnInit, OnChanges {
6868 ngOnInit ( ) : void {
6969 this . data = this . schema . data [ Object . keys ( this . schema . data ) [ 0 ] ] ;
7070 }
71+ newlineToBr = SchemasService . newlineToBr ;
7172}
7273
7374@Component ( {
@@ -109,6 +110,8 @@ export class YANGIdentity implements OnInit, OnChanges {
109110 this . name = Object . keys ( this . schema . data ) [ 0 ]
110111 this . data = this . schema . data [ this . name ] ;
111112 }
113+
114+ newlineToBr = SchemasService . newlineToBr ;
112115}
113116
114117@Component ( {
@@ -137,6 +140,7 @@ export class YANGFeature implements OnInit, OnChanges {
137140 this . name = Object . keys ( this . schema . data ) [ 0 ]
138141 this . data = this . schema . data [ this . name ] ;
139142 }
143+ newlineToBr = SchemasService . newlineToBr ;
140144}
141145
142146@Component ( {
@@ -163,6 +167,8 @@ export class YANGTypedef implements OnInit, OnChanges {
163167 ngOnInit ( ) : void {
164168 this . name = Object . keys ( this . schema . data ) [ 0 ]
165169 }
170+
171+ newlineToBr = SchemasService . newlineToBr ;
166172}
167173
168174@Component ( {
@@ -178,6 +184,8 @@ export class YANGType {
178184
179185 constructor ( public schemasService : SchemasService ) { }
180186
187+ newlineToBr = SchemasService . newlineToBr ;
188+
181189 derivedFrom ( id : string ) {
182190 let i = id . indexOf ( ':' ) ;
183191 let key = id . slice ( 0 , i ) + '.yang' ;
@@ -218,26 +226,7 @@ export class YANGType {
218226
219227@Component ( {
220228 selector : 'yang-restriction' ,
221- template : `
222- <div class="yang-info" *ngIf="name=='pattern'"><span class="yang-info-subsection-label">{{name}}</span><span class="yang-info-value pattern" [innerHTML]="data.value | patternHighlight"></span></div>
223- <div class="yang-info" *ngIf="name!='pattern'"><span class="yang-info-subsection-label">{{name}}</span><span class="yang-info-value">{{data.value}}</span></div>
224- <div class="yang-info-subsection">
225- <div class="yang-info" *ngIf="data.modifier">
226- <span class="yang-info-label">modifier</span><span class="yang-info-value">{{data.modifier.value}}</span>
227- </div>
228- <div class="yang-info" *ngIf="data['error-message']">
229- <span class="yang-info-label">error-message</span><span class="yang-info-value">{{data['error-message'].value}}</span>
230- </div>
231- <div class="yang-info" *ngIf="data['error-app-tag']">
232- <span class="yang-info-label">error-app-tag</span><span class="yang-info-value">{{data['error-app-tag'].value}}</span>
233- </div>
234- <div class="yang-info" *ngIf="data.description">
235- <span class="yang-info-label">description</span><pre class="yang-info-value">{{data.description.text}}</pre>
236- </div>
237- <div class="yang-info" *ngIf="data.reference">
238- <span class="yang-info-label">reference</span><pre class="yang-info-value">{{data.reference.text}}</pre>
239- </div>
240- </div>` ,
229+ templateUrl : './yang.restriction.html' ,
241230 styleUrls : [ './yang.component.scss' ] ,
242231 encapsulation : ViewEncapsulation . None ,
243232} )
@@ -304,6 +293,8 @@ export class YANGNode implements OnInit, OnChanges {
304293 ngOnInit ( ) : void {
305294 this . name = Object . keys ( this . schema . data ) [ 0 ]
306295 }
296+
297+ newlineToBr = SchemasService . newlineToBr ;
307298}
308299
309300@Component ( {
0 commit comments