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

Internal server error when a fenced code block contains an unknown language. #203

Open
jespertheend opened this issue Apr 22, 2023 · 0 comments

Comments

@jespertheend
Copy link

I added 'none' as type to a block of code with tripple backticks:

export class Vec3 {
	/**
	 * My beautiful ascii art:
	 * ```none
	 *    ^ this
	 *    |
	 *    |
	 *    o 170º = 2.9 pi
	 *     \
	 *      \
	 *       V otherVector
	 * ```
	 * @param {Vec3} otherVector
	 */
	angleTo(otherVector) {
		// implementation
	}
}

Without this, vscode was adding undesired syntax highlighting to the fenced code block.

But now doc.deno.land shows an internal server error when trying to see documentation of the class:
https://doc.deno.land/https://gist.githubusercontent.com/jespertheend/83585f96c4cc7b940e80be4965966582/raw/d4d10b6efd3a97b052f7dbbaa6debacd6e357b5f/none-comment-class.js/~/Vec3

As a workaround, you can mark the code block as txt:
https://doc.deno.land/https://gist.githubusercontent.com/jespertheend/fddd18715535160ad7fa6edb6b3d01b3/raw/8262ccd205a9be83adddb76c082328ed142ee773/txt-comment-class.js/~/Vec3

For some reason this is not an issue outside of classes, it seems like these comments don't support fenced code blocks:
https://doc.deno.land/https://gist.githubusercontent.com/jespertheend/1359c87458d4d56b34eb51e9254abad2/raw/3196091001e127a5300ea8162e7b48086f3112df/none-comment-function.js

I think the best approach would be to just treat all unknown languages as txt, but otherwise using txt is a good workaround for now.

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