mik-laj opened a new pull request #313:
URL: https://github.com/apache/airflow-site/pull/313


   
   On the source code pages, everything is linked, making it difficult to copy 
the text. Now that is no longer a link.
   
   Commit generated automatically by the script
   ```
   import glob
   import itertools
   import re
   
   PATTERNS = [
       re.compile(r'(<li class="breadcrumb-item"><a 
href="[^"]+">[^<]+)(</li>)', flags=re.DOTALL),
       re.compile(
           r'(<li class="breadcrumb-item"><a href="[^"]+"> <code class="xref py 
py-mod docutils literal notranslate"><span 
class="pre">[^<]+</span></code>)(</li>)')
   ]
   # CONTENT = """
   #     <li class="breadcrumb-item"><a href="index.html" class="icon 
icon-home"> Home</a></li>
   #     <li class="breadcrumb-item"><a href="errors.html"> Error Tracking</li>
   #     <li class="breadcrumb-item"><a 
href="_api/airflow/hooks/slack_hook/index.html"> <code class="xref py py-mod 
docutils literal notranslate"><span 
class="pre">airflow.hooks.slack_hook</span></code></li>
   # """
   
   files = itertools.chain(*[
       glob.glob(f"docs-archive/{v}/**/*.html", recursive=True)
       for v in ["1.10.6", "1.10.7", "1.10.8", "1.10.9", "1.10.10", "1.10.11", 
"1.10.12"]
   ])
   for input_file in files:
       with open(input_file) as f:
           content = f.read()
       print(input_file)
       for p in PATTERNS:
           content = p.sub(r'\g<1></a>\g<2>', content)
       with open(input_file, "w") as f:
           f.write(content)
   
   ```
   Relaated: https://github.com/apache/airflow-site/pull/304


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to