Skip to content

Commit

Permalink
fix(markdown): relative href links in md and minor styling (#2194)
Browse files Browse the repository at this point in the history
  • Loading branch information
JulieMarie authored Jul 19, 2024
1 parent 10342b5 commit 44aea1e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion libs/angular/dialogs/src/dialog.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
}

::ng-deep button {
text-transform: uppercase;
margin-left: 8px;

[dir='rtl'] & {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class ResizableDraggableDialog {
rightLeft = horizontalAlignment.right;

const icon: HTMLElement = this._renderer2.createElement('i');
this._renderer2.addClass(icon, 'material-icons');
this._renderer2.addClass(icon, 'material-icons-outlined');
this._renderer2.appendChild(
icon,
this._renderer2.createText('filter_list')
Expand Down
7 changes: 4 additions & 3 deletions libs/markdown/src/lib/markdown.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,14 @@ function normalizeHtmlHrefs(html: string, currentHref: string): string {
const hrefWithoutHash: string = removeTrailingHash(
link.getAttribute('href')
);

url.href = generateHref(currentHref, hrefWithoutHash);
// since this might be a relative path, don't assign it to url.href
// relative path won't be a valid href to assign to URL
const newHref = generateHref(currentHref, hrefWithoutHash);

if (originalHash) {
url.hash = genHeadingId(originalHash);
}
link.href = url.href;
link.href = newHref;
}
link.target = '_blank';
} else {
Expand Down

0 comments on commit 44aea1e

Please sign in to comment.