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 ">
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 </ ng-container >
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ import {
6262 ThemedFullFileSectionComponent
6363} from './full/field-components/file-section/themed-full-file-section.component' ;
6464import { UnpaywallVersionsComponent } from './unpaywall-versions/unpaywall-versions.component' ;
65+ import { MarkdownViewerModule } from '../shared/markdown-viewer/markdown-viewer.module' ;
6566
6667
6768const ENTRY_COMPONENTS = [
@@ -126,6 +127,7 @@ const DECLARATIONS = [
126127 CrisItemPageModule ,
127128 ContextMenuModule . withEntryComponents ( ) ,
128129 MiradorViewerModule ,
130+ MarkdownViewerModule ,
129131 ] ,
130132 declarations : [
131133 ...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