Skip to content

Commit af8e73a

Browse files
author
Andrea Barbasso
committed
[UXP-114] pre-tests changes
1 parent c5e24c0 commit af8e73a

4 files changed

Lines changed: 9 additions & 2 deletions

File tree

src/app/item-page/full/full-item-page.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
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)">

src/app/item-page/item-page.module.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ import { ThemedItemAlertsComponent } from './alerts/themed-item-alerts.component
6161
import {
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

6567
const 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,

src/app/shared/utils/markdown.pipe.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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

src/themes/custom/lazy-theme.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ import { RequestCopyModule } from 'src/app/request-copy/request-copy.module';
170170
import {UserMenuComponent} from './app/shared/auth-nav-menu/user-menu/user-menu.component';
171171
import { BrowseByComponent } from './app/shared/browse-by/browse-by.component';
172172
import { RegisterEmailFormComponent } from './app/register-email-form/register-email-form.component';
173+
import { MarkdownViewerModule } from '../../app/shared/markdown-viewer/markdown-viewer.module';
173174

174175
const 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: [

0 commit comments

Comments
 (0)