@@ -29,33 +29,33 @@ let createDirectoryIfNotExists = (dirPath: string): unit => {
2929}
3030
3131let removeCodeTabTags = (content : string ): string => {
32- let regex = Js . Re .fromStringWithFlags ("<CodeTab.*?>[\\ s\\ S]*?</CodeTab>" , ~flags = "g" )
33- Js . String .replaceByRe ( regex , "" , content )
32+ let regex = RegExp .fromStringWithFlags ("<CodeTab.*?>[\\ s\\ S]*?</CodeTab>" , ~flags = "g" )
33+ String .replaceRegExp ( content , regex , "" )
3434}
3535
3636let removeCodeBlocks = (content : string ): string => {
37- let regex = Js . Re .fromStringWithFlags ("```[a-zA-Z]+\\ s*[\\ s\\ S]*?```" , ~flags = "g" )
38- Js . String .replaceByRe ( regex , "" , content )
37+ let regex = RegExp .fromStringWithFlags ("```[a-zA-Z]+\\ s*[\\ s\\ S]*?```" , ~flags = "g" )
38+ String .replaceRegExp ( content , regex , "" )
3939}
4040
4141let removeFileTitle = (content : string ): string => {
42- let regex = Js . Re .fromStringWithFlags ("---\n title[\\ s\\ S]*?---" , ~flags = "g" )
43- Js . String .replaceByRe ( regex , "" , content )
42+ let regex = RegExp .fromStringWithFlags ("---\n title[\\ s\\ S]*?---" , ~flags = "g" )
43+ String .replaceRegExp ( content , regex , "" )
4444}
4545
4646let removeUnnecessaryBreaks = (content : string ): string => {
47- let regex = Js . Re .fromStringWithFlags ("^\n {2,}" , ~flags = "g" )
48- Js . String .replaceByRe ( regex , "" , content )
47+ let regex = RegExp .fromStringWithFlags ("^\n {2,}" , ~flags = "g" )
48+ String .replaceRegExp ( content , regex , "" )
4949}
5050
5151let removeToDos = (content : string ): string => {
52- let regex = Js . Re .fromStringWithFlags ("<!-- TODO[\\ s\\ S]*?-->" , ~flags = "g" )
53- Js . String .replaceByRe ( regex , "" , content )
52+ let regex = RegExp .fromStringWithFlags ("<!-- TODO[\\ s\\ S]*?-->" , ~flags = "g" )
53+ String .replaceRegExp ( content , regex , "" )
5454}
5555
5656let fillContentWithVersion = (content : string , version : string ): string => {
57- let regex = Js . Re .fromStringWithFlags ("<VERSION>" , ~flags = "g" )
58- Js . String .replaceByRe ( regex , version , content )
57+ let regex = RegExp .fromStringWithFlags ("<VERSION>" , ~flags = "g" )
58+ String .replaceRegExp ( content , regex , version )
5959}
6060
6161let createFullFile = (content : string , filePath : string ): unit => {
@@ -113,7 +113,7 @@ let processVersions = (
113113 versionDir
114114 -> collectFiles
115115 -> Array .forEach (filePath => {
116- if Js . String .endsWith (".mdx" , filePath ) {
116+ if String .endsWith (filePath , ".mdx" ) {
117117 let content = readMarkdownFile (filePath )
118118
119119 content -> createFullFile (fullFilePath )
0 commit comments