This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #655 from avelow/master
add types/katex, import options from katex and optimize import
- Loading branch information
Showing
9 changed files
with
17 additions
and
24 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
import { ElementRef, Injectable } from '@angular/core'; | ||
import * as ko from './ng-katex.options'; | ||
|
||
import * as katex from 'katex'; | ||
import { render, renderToString, KatexOptions } from 'katex'; | ||
|
||
@Injectable() | ||
export class KatexService { | ||
|
||
render(equation: string, element: ElementRef, options?: ko.KatexOptions) { | ||
return katex.render(equation, element.nativeElement, options); | ||
render(equation: string, element: ElementRef, options?: KatexOptions) { | ||
return render(equation, element.nativeElement, options); | ||
} | ||
|
||
renderToString(equation: string, options?: ko.KatexOptions): string { | ||
return katex.renderToString(equation, options); | ||
renderToString(equation: string, options?: KatexOptions): string { | ||
return renderToString(equation, options); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export * from './ng-katex.options'; | ||
export * from './ng-katex.component'; | ||
export * from './ng-katex-paragraph.component'; | ||
export * from './ng-katex.module'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
/* | ||
* Public API Surface of ng-katex | ||
*/ | ||
export * from './lib/ng-katex.options'; | ||
export * from './lib/ng-katex.component'; | ||
export * from './lib/ng-katex-paragraph.component'; | ||
export * from './lib/ng-katex.module'; |