diff --git a/packages/tl-reference/scripts/prepare-data.js b/packages/tl-reference/scripts/prepare-data.js index 3bc0a5fc..11589cfc 100644 --- a/packages/tl-reference/scripts/prepare-data.js +++ b/packages/tl-reference/scripts/prepare-data.js @@ -42,7 +42,7 @@ const camelToSnake = (str) => const camelToPascal = (s) => s[0].toUpperCase() + s.substr(1) function renderDescription(description) { - return marked.parseInline( + return marked( description.replace(/{@link (.+?)}/g, (_, name) => { if (name.startsWith('tl.')) { let [ns, type] = name.substr(3).split('.') @@ -75,7 +75,7 @@ function renderDescription(description) { } return `\`${name}\`` }) - ) + ).replace(/<(\/)?p>/g, '<$1div>') // replace

with

} function prepareData(data) { diff --git a/packages/tl-reference/src/global.scss b/packages/tl-reference/src/global.scss index 57c2b101..52732c47 100644 --- a/packages/tl-reference/src/global.scss +++ b/packages/tl-reference/src/global.scss @@ -35,14 +35,17 @@ h2, h3, h4 { word-break: break-all; } -table { - overflow-x: auto; - display: block!important; - white-space: nowrap; -} - -table tbody { - display: table; - width: 100%; +// table scroll for mobiles +@media screen and (max-width: 640px) { + table { + overflow-x: auto; + display: block !important; + white-space: nowrap; + } + + table tbody { + display: table; + width: 100%; + } }