Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mermaid from imported markdown files #473

Closed
azatoth opened this issue Nov 11, 2021 · 2 comments · Fixed by #562
Closed

mermaid from imported markdown files #473

azatoth opened this issue Nov 11, 2021 · 2 comments · Fixed by #562
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@azatoth
Copy link
Contributor

azatoth commented Nov 11, 2021

Describe the bug
When importing a file into typedoc using [[include:path/to/file.md]], mermaid tags will not be handled and it will complain it can't highlight it.

To Reproduce

Steps to reproduce the behavior:

  1. Create typescript foo.ts:
/**
 * [[include:foo.md]]
 */
export class Foo {

}
  1. Create foo.md with:
# Foo

```mermaid
  flowChart TB
    A --> B
```
  1. Execute typedoc:
    typedoc src/foo.ts --logLevel Verbose --includes src/

Info: Loaded plugin typedoc-plugin-mermaid
Debug: Using TypeScript 4.3.5 from ./node_modules/typescript/lib
Debug: Converting with 1 programs 1 entry points
Debug: Finished getting entry points in 7598ms
Debug: Begin readme search at ./src
Debug: Finished conversion in 99ms
Debug: Renderer: Loading highlighter took 472ms
Warning:
Unsupported highlight language "mermaid" will not be highlighted. Run typedoc --help for a list of supported languages.
target code block :
flowChart TB
A --> B
source files :undefined
output file :
undefined
Info: Documentation generated at ./docs
Debug: HTML rendering took 493ms

  1. See error

Expected behavior
I expect mermaid blocks be rendered from the included markdown file

@kamiazya kamiazya added enhancement New feature or request help wanted Extra attention is needed bug Something isn't working and removed enhancement New feature or request labels Nov 12, 2021
@kamiazya
Copy link
Owner

@azatoth
It didn't seem to work because the Markdown conversion and file loading timings didn't match.

PR Welcome.

@kamiazya
Copy link
Owner

fixed by #560

Thanks for @WHenderson !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants