Use <details> in cherry picking docs
This commit is contained in:
parent
3aef20c160
commit
c80d631108
2 changed files with 2792 additions and 255 deletions
3035
doc/custom-build.md
3035
doc/custom-build.md
File diff suppressed because one or more lines are too long
|
@ -48,19 +48,21 @@ export default async function processCherryPickingStyles(argv, dirs) {
|
|||
}
|
||||
|
||||
function formatCv(md, dirs, info) {
|
||||
md.log(` - ${info.introMD}:`);
|
||||
const INDENT = ` `;
|
||||
md.log(` - <details><summary>${info.introMD}</summary>`);
|
||||
const imgWidth = 32 * info.sampleImageCountEm;
|
||||
let sTable = " <table>";
|
||||
let sTable = INDENT + "<table>" + "\n";
|
||||
for (const alt of info.alternatives) {
|
||||
const imageId = `${dirs.images}/cv-${alt.imageId}`;
|
||||
const image = ImgX(imageId, imgWidth);
|
||||
const selectorText = alt.selectors.map(x => `<code>${x}</code>`).join(", ");
|
||||
sTable +=
|
||||
INDENT +
|
||||
`<tr><td rowspan="2" width="${2 * 14 + imgWidth}">${image}</td>` +
|
||||
`<td>${selectorText}</td></tr>`;
|
||||
sTable += `<tr><td>${alt.description}</td></tr>`;
|
||||
`<td>${selectorText}</td></tr>\n`;
|
||||
sTable += INDENT + `<tr><td>${alt.description}</td></tr>\n`;
|
||||
}
|
||||
sTable += "</table>";
|
||||
sTable += INDENT + "</table></details>";
|
||||
md.log(sTable);
|
||||
}
|
||||
function formatDescription(s) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue