vtlim commented on code in PR #519:
URL: https://github.com/apache/druid-website-src/pull/519#discussion_r1966102544
##########
scripts/copy_druid_docs.py:
##########
@@ -57,13 +59,14 @@ def check_source(source_directory):
def replace_text_in_file(destination_directory, druid_version):
"""
- Find/replace {{DRUIDVERSION}} with the actual version
+ Find/replace "{{DRUIDVERSION}}", "\{DRUIDVERSION}", "\{{DRUIDVERSION}}",
"\{DRUIDVERSION}}"
"""
-
with open(destination_directory, 'r') as file:
file_content = file.read()
- modified_content = file_content.replace(druid_variable, druid_version)
+
+ pattern = r"\{\{DRUIDVERSION\}\}|\{DRUIDVERSION\}"
Review Comment:
```suggestion
pattern = r"([\\{]*)DRUIDVERSION([\\}]*)"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]