Created
November 26, 2019 08:40
-
-
Save faithandbrave/b3597f8cf608ad30a5f8535a056a92e9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import glob | |
| import re | |
| for filename in glob.glob("site/**/*.md", recursive=True): | |
| #print(filename) | |
| data: str = "" | |
| with open(filename, "r") as f: | |
| data = f.read() | |
| data = data.replace(", C++11 mode", "") | |
| data = data.replace(", C++14 mode", "") | |
| data = data.replace(", C++1y mode", "") | |
| data = data.replace(", C++17 mode", "") | |
| data = data.replace(", C++20 mode", "") | |
| data = data.replace(" C++11 mode", "") | |
| data = data.replace(" C++14 mode", "") | |
| data = data.replace(" C++1y mode", "") | |
| data = data.replace(" C++17 mode", "") | |
| data = data.replace(" C++20 mode", "") | |
| data = data.replace("- [Clang libc++]", "- [Clang]") | |
| data = data.replace("- [GCC](/implementation.md#gcc): \n- [GCC](/implementation.md#gcc):", "- [GCC](/implementation.md#gcc):") | |
| data = data.replace("- [GCC](/implementation.md#gcc):\n- [GCC](/implementation.md#gcc):", "- [GCC](/implementation.md#gcc):") | |
| data = data.replace("- [GCC](/implementation.md#gcc): ??\n- [GCC](/implementation.md#gcc):", "- [GCC](/implementation.md#gcc):") | |
| data = data.replace("- [GCC](/implementation.md#gcc): ?\n- [GCC](/implementation.md#gcc):", "- [GCC](/implementation.md#gcc):") | |
| data = data.replace("- [GCC](/implementation.md#gcc): -\n- [GCC](/implementation.md#gcc):", "- [GCC](/implementation.md#gcc):") | |
| with open(filename, "w") as f: | |
| f.write(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment