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

Allow arbitrary language on code block #209

Open
lambdalisue opened this issue Feb 4, 2024 · 0 comments
Open

Allow arbitrary language on code block #209

lambdalisue opened this issue Feb 4, 2024 · 0 comments

Comments

@lambdalisue
Copy link

It appears that when an unknown language is specified in code blocks, docland fails to generate documentation with the following error:

[uncaught application error]: Error - Unknown language: `vim` is not registered

request: {
  url: "http://0.0.0.0:8080/https://raw.githubusercontent.com/vim-denops/deno-denops-std/main/argument/mod.t"... 1 more character,
  method: "GET",
  hasBody: false
}
response: { status: 500, type: "html", hasBody: true, writable: true }

    at a (https://esm.sh/v91/[email protected]/denonext/fault.mjs:2:312)
    at Object.u [as highlight] (https://esm.sh/v91/[email protected]/denonext/lowlight.mjs:2:2820)
    at syntaxHighlight (file:///Users/alisue/ghq/github.com/denoland/docland/components/common.tsx:148:27)
    at MarkdownBlock (file:///Users/alisue/ghq/github.com/denoland/docland/components/markdown.tsx:101:28)
    at renderFunctionalComponent (https://deno.land/x/[email protected]/core.ts:160:18)
    at _render (https://deno.land/x/[email protected]/core.ts:134:70)
    at https://deno.land/x/[email protected]/core.ts:46:17
    at Array.forEach (<anonymous>)
    at appendChildren (https://deno.land/x/[email protected]/core.ts:41:12)
    at h (https://deno.land/x/[email protected]/core.ts:286:3)
[error] Error: Unknown language: `vim` is not registered

    at a (https://esm.sh/v91/[email protected]/denonext/fault.mjs:2:312)
    at Object.u [as highlight] (https://esm.sh/v91/[email protected]/denonext/lowlight.mjs:2:2820)
    at syntaxHighlight (file:///Users/alisue/ghq/github.com/denoland/docland/components/common.tsx:148:27)
    at MarkdownBlock (file:///Users/alisue/ghq/github.com/denoland/docland/components/markdown.tsx:101:28)
    at renderFunctionalComponent (https://deno.land/x/[email protected]/core.ts:160:18)
    at _render (https://deno.land/x/[email protected]/core.ts:134:70)
    at https://deno.land/x/[email protected]/core.ts:46:17
    at Array.forEach (<anonymous>)
    at appendChildren (https://deno.land/x/[email protected]/core.ts:41:12)
    at h (https://deno.land/x/[email protected]/core.ts:286:3)

I believe docland should allow arbitrary languages in code blocks.


Note

This causes a "The documentation for this module is currently unavailable." message on the module documentation of deno.land like

CleanShot 2024-02-04 at 15 29 59

It seems this error affects the parent module as well, even though the parent is fine. This is a bit painful for users, as they may feel that the documentation is not ready yet...

CleanShot 2024-02-04 at 15 31 14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant