fix(tl-ref): layout and content preprocessing fixes
This commit is contained in:
parent
ad511546ca
commit
874ea6c0a2
2 changed files with 14 additions and 11 deletions
|
@ -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 <p> with <div>
|
||||
}
|
||||
|
||||
function prepareData(data) {
|
||||
|
|
|
@ -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%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue