File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 < ng-container *ngFor ="let mdEntry of (metadata$ | async) | keyvalue ">
2323 < tr *ngFor ="let mdValue of mdEntry.value | slice:0:(metadataMapLimit$ | async).get(mdEntry.key) ">
2424 < td > {{mdEntry.key}}</ td >
25- < td > {{ mdValue.value}} </ td >
25+ < td > < ds-markdown-viewer [value] =" mdValue.value " > </ ds-markdown-viewer > </ td >
2626 < td > {{mdValue.language}}</ td >
2727 </ tr >
2828 < tr *ngIf ="mdEntry.value.length > (metadataMapLimit$ | async).get(mdEntry.key) ">
Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ import { ThemedItemAlertsComponent } from './alerts/themed-item-alerts.component
6161import {
6262 ThemedFullFileSectionComponent
6363} from './full/field-components/file-section/themed-full-file-section.component' ;
64+ import { MarkdownViewerModule } from '../shared/markdown-viewer/markdown-viewer.module' ;
65+
6466
6567const ENTRY_COMPONENTS = [
6668 // put only entry components that use custom decorator
@@ -123,6 +125,7 @@ const DECLARATIONS = [
123125 CrisItemPageModule ,
124126 ContextMenuModule . withEntryComponents ( ) ,
125127 MiradorViewerModule ,
128+ MarkdownViewerModule ,
126129 ] ,
127130 declarations : [
128131 ...DECLARATIONS ,
Original file line number Diff line number Diff line change @@ -63,7 +63,9 @@ export class MarkdownPipe implements PipeTransform {
6363
6464 let html : string ;
6565 if ( environment . markdown . mathjax ) {
66+ // TODO: instead of using md.use with mathjax, use ng-katex rendering from its service
6667 md . use ( await this . mathjax ) ;
68+ // TODO: keep this as is
6769 const sanitizeHtml = await this . sanitizeHtml ;
6870 html = sanitizeHtml ( md . render ( value ) , {
6971 // sanitize-html doesn't let through SVG by default, so we extend its allowlists to cover MathJax SVG
Original file line number Diff line number Diff line change @@ -170,6 +170,7 @@ import { RequestCopyModule } from 'src/app/request-copy/request-copy.module';
170170import { UserMenuComponent } from './app/shared/auth-nav-menu/user-menu/user-menu.component' ;
171171import { BrowseByComponent } from './app/shared/browse-by/browse-by.component' ;
172172import { RegisterEmailFormComponent } from './app/register-email-form/register-email-form.component' ;
173+ import { MarkdownViewerModule } from '../../app/shared/markdown-viewer/markdown-viewer.module' ;
173174
174175const DECLARATIONS = [
175176 FileSectionComponent ,
@@ -324,7 +325,8 @@ const DECLARATIONS = [
324325 MiradorViewerModule ,
325326 FooterModule ,
326327 ExploreModule ,
327- SocialModule
328+ SocialModule ,
329+ MarkdownViewerModule ,
328330 ] ,
329331 declarations : DECLARATIONS ,
330332 exports : [
You can’t perform that action at this time.
0 commit comments