File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
src/app/component/circular-heatmap Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,19 @@ <h2>Nothing to show</h2>
4545 </ mat-panel-title >
4646 </ mat-expansion-panel-header >
4747 < ng-template matExpansionPanelContent >
48- < p [innerHTML] ="activityDetails.description "> </ p >
48+ < div
49+ *ngIf ="
50+ markdown.render(activityDetails.description);
51+ else ifFileIsNotAMarkdown
52+ ">
53+ < p
54+ [innerHTML] ="
55+ markdown.render(activityDetails.description)
56+ "> </ p >
57+ </ div >
58+ < ng-template #ifFileIsNotAMarkdown >
59+ < p [innerHTML] ="activityDetails.description "> </ p >
60+ </ ng-template >
4961 </ ng-template >
5062 </ mat-expansion-panel >
5163 < mat-expansion-panel
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import * as d3 from 'd3';
1010import * as yaml from 'js-yaml' ;
1111import { Router } from '@angular/router' ;
1212import { MatChip } from '@angular/material/chips' ;
13+ import * as md from 'markdown-it' ;
1314
1415export interface activitySchema {
1516 uuid : string ;
@@ -56,6 +57,7 @@ export class CircularHeatmapComponent implements OnInit {
5657 segment_labels : string [ ] = [ ] ;
5758 activityDetails : any ;
5859 showOverlay : boolean ;
60+ markdown : md = md ( ) ;
5961
6062 constructor (
6163 private yaml : ymlService ,
You can’t perform that action at this time.
0 commit comments