Files
ykxmz/_build/strip_bom_msg.py
T
xmz7891 51565112b9 网页改成白色简洁 + 修官网两个 bug
配色
- 官网 / 登录页 / 管理页从 GitHub 深色风改成白色简洁
  (用户的设计理念:所有东西都要白色简洁)
- 白底上把浅灰文字换成深色,链接蓝也调深一档保证对比度

修 bug
- 管理入口的链接拼接写坏了,页面上显示成 href= + ADMIN_PATH +,
  点了打不开管理页
- .lead 用的是深色主题的浅灰,白底上几乎看不见

其他
- 清掉提交信息里的 BOM(PowerShell 的 Set-Content 加的)
2026-10-06 23:10:08 +08:00

28 lines
705 B
Python
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- coding: utf-8 -*-
r'''清掉提交信息开头的 BOM。
现象:Gitee 上提交记录显示 "1.7.1:修白屏...",
开头那个看不见的字符就是 BOM ——
PowerShell 的 Set-Content -Encoding UTF8 会加上它。
这个脚本给 git filter-branch --msg-filter 用。
'''
from __future__ import annotations
import sys
def main() -> int:
raw = sys.stdin.buffer.read()
# 直接按字节去掉开头的 BOM,别先解码
if raw.startswith(b"\xef\xbb\xbf"):
raw = raw[3:]
# 正文里也可能混进 BOM,一并清掉
raw = raw.replace(b"\xef\xbb\xbf", b"")
sys.stdout.buffer.write(raw)
return 0
if __name__ == "__main__":
sys.exit(main())