INNER CODE UNIT · JavaScript

regex

codeceptjs/CodeceptJS · Bunoshfile.js:308

      const regex = /## config((.|\n)*)\[1\]/m
      const fullText = fs.readFileSync(helperMarkDownFile(name)).toString()
      const text = fullText.match(regex)
      if (!text) return

      cfg.replace('<!-- configuration -->', text[1])
      cfg.replace(regex, '[1]')
    })

    await writeToFile(helperMarkDownFile(name), line => {
      line`---
permalink: /helpers/${name}
editLink: false
sidebar: auto
title: ${name}
---

`

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…