Skip to content

Commit

Permalink
Update template.service.js
Browse files Browse the repository at this point in the history
  • Loading branch information
majidh1 authored Jan 28, 2024
1 parent 7d33bd9 commit 1d64171
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions builder/template.service.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const { checkValidateRegex } = require("./validate.service.js");

function getContentFromTemplate(regexItem){
function getContentFromTemplate(regexItem,style){
const itemTemplate = `
<details dir="rtl">
<details dir="rtl" style="${style}">
<summary>[title]</summary>
<br>
[description]
Expand Down Expand Up @@ -34,7 +34,7 @@ function getContentListFromTemplate(regexItem){
`

regexItem.list.forEach(item => {
result = result.replace("</detailsLast>",getContentFromTemplate(item)+"\n</detailsLast>")
result = result.replace("</detailsLast>",getContentFromTemplate(item,"padding: 0 25px")+"\n</detailsLast>")
});

return result.replace("</detailsLast>","</details>");
Expand All @@ -43,4 +43,4 @@ function getContentListFromTemplate(regexItem){
module.exports = {
getContentFromTemplate,
getContentListFromTemplate
}
}

0 comments on commit 1d64171

Please sign in to comment.