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3.4.2
3.4.1
3.4.0
3.2.3
3.2.2
3.2.1
3.1.1
3.1.0
3.0.0
2.11.0
2.9.2
2.9.1
2.9.0
2.8.0
2.7.1
2.7.0
2.6.6
2.6.5
2.6.3
2.6.2
2.6.0
2.5.0
2.4.1
2.4.0
2.3.3
2.3.2
2.3.1
2.3.0
2.2.0
2.1.1
2.0.4
2.0.0
1.2.0
1.0.4
Yet Another Rope Ladder from Evernote
github.com/akosbalasko/yarle
akosbalasko/yarle
yarle-evernote-to-md
/
src
/
utils
/
templates
/
apply-functions
/
apply-conditional-template.ts
7 lines
(6 loc)
•
301 B
text/typescript
View Raw
1
2
3
4
5
6
7
export
const
applyConditionalTemplate = (
text
:
string
,
P
:
any
,
newValue
:
string
):
string
=>
{
return
text .
replace
(
new
RegExp
(
`
${P.CONTENT_PLACEHOLDER}
`
,
'g'
), newValue) .
replace
(
new
RegExp
(
`
${P.START_BLOCK}
`
,
'g'
),
''
) .
replace
(
new
RegExp
(
`
${P.END_BLOCK}
`
,
'g'
),
''
); };