From 253e025cc17081287309a9a613506c62731d8fa5 Mon Sep 17 00:00:00 2001 From: Brian Johnson Date: Fri, 8 Mar 2019 08:41:38 -0600 Subject: [PATCH] Enable Commonmark table extension Commonmark itself does not support tables, but instead delegates that kind of functionality to extensions. The Remarkable configuration preset "commonmark" is a strict interpretation of the spec. This enables the table extension which brings Swagger UI back in line with the 2.x line which had this same extension enabled for Markdown. Other tools such as Apiary that support OAS 3/Commonmark are also enabling this extension, so there is precedence for doing this outside of Swagger UI as well. --- src/core/plugins/oas3/wrap-components/markdown.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/plugins/oas3/wrap-components/markdown.jsx b/src/core/plugins/oas3/wrap-components/markdown.jsx index c0ce7d8a1cd..51c44a05e22 100644 --- a/src/core/plugins/oas3/wrap-components/markdown.jsx +++ b/src/core/plugins/oas3/wrap-components/markdown.jsx @@ -6,7 +6,7 @@ import { OAS3ComponentWrapFactory } from "../helpers" import { sanitizer } from "core/components/providers/markdown" const parser = new Remarkable("commonmark") - +parser.block.ruler.enable(["table"]) parser.set({ linkTarget: "_blank" }) export const Markdown = ({ source, className = "" }) => {