Skip to content

Commit

Permalink
Merge branch 'liskdocs-54-script-update' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Tschakki committed Feb 14, 2025
2 parents bdc4ee2 + 9ad1114 commit 73dbd43
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions plugins/generated-bridged-token-adresses-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,13 @@ const tableHeads = {

export const generatedDocs = () => {
return async (root) => {
visit(root, (node) => {
if (node.type !== 'table') {
return
}
visit(root, "table", (node) => {
// For every table in the docs
node.children.forEach(row => {
row.children.forEach(cell => {
cell.children.forEach(cellChild => {
// Find a cell with the value 'Bridged Token Mainnet'
if( cellChild.value === (tableHeads.eng[0] || tableHeads.ind[0])) {
if( cellChild.value === tableHeads.eng[0] || cellChild.value === tableHeads.ind[0]) {
cellChild.value = 'Bridged Token Name';
// Add a new row for each Mainnet token
LiskAdresses.forEach(token => {
Expand Down Expand Up @@ -131,7 +128,7 @@ export const generatedDocs = () => {
}
});
// Find a cell with the value 'Bridged Token Sepolia'
} else if (cellChild.value === (tableHeads.eng[1] || tableHeads.ind[1])) {
} else if (cellChild.value === tableHeads.eng[0] || cellChild.value === tableHeads.ind[0]) {
cellChild.value = 'Bridged Token Name';
// Add a new row for each Sepolia token
LiskAdresses.forEach(token => {
Expand Down

0 comments on commit 73dbd43

Please sign in to comment.