Skip to content

Commit 6922fba

Browse files
authored
Merge branch 'HMCL-dev:main' into minimal-mistakes-plus
2 parents 8eeaa22 + e0303cb commit 6922fba

7 files changed

Lines changed: 65 additions & 29 deletions

File tree

_changelogs/dev/3.14/3.14.0.341.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
---
3+
4+
[详细版本介绍 (Bilibili)](https://www.bilibili.com/opus/1192630259688669201)
5+
6+
- GP-5940: 支持更多 Vulkan 渲染器 (by Glavo) [BV1Nhd5B9ENc](https://bilibili.com/video/BV1Nhd5B9ENc)
7+
- GP-5945: 增大自动安装界面加载器名称版本号间距 (by 辞庐)
8+
- GP-5949: 上传微软账户皮肤时校验大小 (by 辞庐)
9+
- GP-5944: 优化菜单分隔符颜色 (by 辞庐,Glavo)
10+
- GP-5946: 隐藏 CurseForge 源中游戏内容的不重要标签 (by 辞庐)
11+
12+
错误修复:
13+
14+
- GP-5943: 修复模组名字过长时下载页面布局异常的问题 (by 辞庐)

_changelogs/dev/3.6/3.6.11.265.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
- GP-3490: 修复 OAuth 登录时轮询过于频繁的问题
1010
- GP-3464: 修复在更新日志界面无法拖动启动器窗口的问题
1111
- GP-3503: 使用 Zink 渲染器时禁用 DRI3
12-
- GC-`5fd52bb`: 皮肤缓存不再保存到 .minecraft 目录
13-
- GC-`d5408c3`: 版本特定游戏设置从全局设置复制
14-
- GC-`81b3911`: 修复按 ESC 键时文本框内的值没有保存的问题
15-
- GC-`260f4b6`: 修复输入对话框中 ESC 键不起作用的问题
16-
- GC-`7d12ef6`: 修复内存滑块提示被设备内存进度条覆盖的问题
17-
- GC-`78e15d1`: 修复游戏设置中内存没有实时刷新的问题
18-
- GC-`6f53da1`: 完善模组下载界面
12+
- GC-5fd52bb: 皮肤缓存不再保存到 .minecraft 目录
13+
- GC-d5408c3: 版本特定游戏设置从全局设置复制
14+
- GC-81b3911: 修复按 ESC 键时文本框内的值没有保存的问题
15+
- GC-260f4b6: 修复输入对话框中 ESC 键不起作用的问题
16+
- GC-7d12ef6: 修复内存滑块提示被设备内存进度条覆盖的问题
17+
- GC-78e15d1: 修复游戏设置中内存没有实时刷新的问题
18+
- GC-6f53da1: 完善模组下载界面

_changelogs/dev/3.6/3.6.11.266.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
错误修复
1111

1212
- GP-3252: 修复无法补全部分第三方 Minecraft 客户端游戏资源的问题
13-
- GC-`56d20a5`, GC-`397edae`: 修复 Linux 平台调整窗口大小的问题
13+
- GC-56d20a5, GC-397edae: 修复 Linux 平台调整窗口大小的问题
1414
- GP-3531: 修复在 FreeBSD x86-64 平台未正确替换 LWJGL 本地库的问题
1515
- GP-3541: 修复安装 MultiMC 整合包后没有设置图标的问题

_changelogs/dev/3.6/3.6.11.267.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
- GP-3594: Java 下载对话框中切换包类型时不应重置版本字段
1313
- GP-3598: 修复使用自定义字体时未正确设置字重的问题
1414
- GP-3602: 修复使用系统 GLFW/OpenAL 时无法启动部分游戏版本的问题
15-
- GC-`ecafc9d`: 修复安装新游戏页面中组件框的高度问题
15+
- GC-ecafc9d: 修复安装新游戏页面中组件框的高度问题

_changelogs/stable/3.6/3.6.12.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,21 @@
5252
- GP-3490: 修复 OAuth 登录时轮询过于频繁的问题
5353
- GP-3464: 修复在更新日志界面无法拖动启动器窗口的问题
5454
- GP-3503: 使用 Zink 渲染器时禁用 DRI3
55-
- GC-`5fd52bb`: 皮肤缓存不再保存到 .minecraft 目录
56-
- GC-`81b3911`: 修复按 ESC 键时文本框内的值没有保存的问题
57-
- GC-`260f4b6`: 修复输入对话框中 ESC 键不起作用的问题
58-
- GC-`7d12ef6`: 修复内存滑块提示被设备内存进度条覆盖的问题
59-
- GC-`78e15d1`: 修复游戏设置中内存没有实时刷新的问题
60-
- GC-`6f53da1`: 完善模组下载界面
55+
- GC-5fd52bb: 皮肤缓存不再保存到 .minecraft 目录
56+
- GC-81b3911: 修复按 ESC 键时文本框内的值没有保存的问题
57+
- GC-260f4b6: 修复输入对话框中 ESC 键不起作用的问题
58+
- GC-7d12ef6: 修复内存滑块提示被设备内存进度条覆盖的问题
59+
- GC-78e15d1: 修复游戏设置中内存没有实时刷新的问题
60+
- GC-6f53da1: 完善模组下载界面
6161
- GP-3252: 修复无法补全部分第三方 Minecraft 客户端游戏资源的问题
62-
- GC-`56d20a5`, GC-`397edae`: 修复 Linux 平台调整窗口大小的问题
62+
- GC-56d20a5, GC-397edae: 修复 Linux 平台调整窗口大小的问题
6363
- GP-3531: 修复在 FreeBSD x86-64 平台未正确替换 LWJGL 本地库的问题
6464
- GP-3541: 修复安装 MultiMC 整合包后没有设置版本图标的问题
6565
- GP-3549: 修复 macOS 平台 HMCLauncher.sh 不会显示 Java 下载页面的问题
6666
- GP-3594: Java 下载对话框中切换包类型时不应重置版本字段
6767
- GP-3598: 修复使用自定义字体时未正确设置字重的问题
6868
- GP-3602: 修复使用系统 GLFW/OpenAL 时无法启动部分游戏版本的问题
69-
- GC-`ecafc9d`: 修复安装新游戏页面中组件框的高度问题
69+
- GC-ecafc9d: 修复安装新游戏页面中组件框的高度问题
7070
- GP-3618: 修复无法识别 Intel64 架构的问题
7171
- GP-3626: 修复离线账户选择 Steve/Alex 皮肤时模型错误的问题
7272
- GP-3622: 修复在非官方支持的平台上 Minecraft 1.21 与 Sodium 不兼容的问题

_layouts/document.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
<script>
1010
{%- if page.author %}appendMeta("{{ page.author }}", "fas fa-user-pen");{% endif -%}
1111
{%- for contributor in page.contributors %}appendMeta("{{ contributor }}", "fas fa-user-pen");{% endfor -%}
12-
{%- if jekyll.environment == 'production' and page.hits %}hits("{{ page.url | absolute_url | url_encode }}");{% endif -%}
12+
{%- if jekyll.environment == 'production' and page.hits %}hits({{ page.url | absolute_url | jsonify }});{% endif -%}
1313
</script>
1414
{% endif %}

_plugins/kramdown_enhancer.rb

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
rescue LoadError; end
44

55
module KramdownEnhancer
6+
GITHUB_LINK_REGEX = /\b(GP-\d+|GC-[0-9a-f]{7})\b/
7+
BLOCKQUOTE_TYPES = {
8+
note: "notice--info",
9+
tip: "notice--success",
10+
important: "notice--primary",
11+
warning: "notice--warning",
12+
caution: "notice--danger",
13+
}
14+
615
class << self
716
def webp
817
@webp ||= {}
@@ -25,16 +34,6 @@ def baseurl=(input)
2534
""
2635
end
2736
end
28-
29-
def blockquote_types
30-
@blockquote_types ||= {
31-
:note => "notice--info",
32-
:tip => "notice--success",
33-
:important => "notice--primary",
34-
:warning => "notice--warning",
35-
:caution => "notice--danger",
36-
}
37-
end
3837
end
3938

4039
class WebpFile < Jekyll::StaticFile
@@ -81,7 +80,7 @@ def convert_blockquote(el, indent)
8180
return super unless first&.type == :text
8281

8382
text = first.value.downcase
84-
KramdownEnhancer.blockquote_types.each do |type, class_name|
83+
KramdownEnhancer::BLOCKQUOTE_TYPES.each do |type, class_name|
8584
prefix = "[!#{type}]"
8685
prefix_with_newline = "#{prefix}\n"
8786

@@ -128,6 +127,29 @@ def convert_html_element(el, indent)
128127
super(el, indent)
129128
end
130129

130+
def convert_text(el, indent)
131+
return super(el, indent) unless !el.options[:github_link] && KramdownEnhancer::GITHUB_LINK_REGEX.match?(el.value)
132+
list = el.value.split(KramdownEnhancer::GITHUB_LINK_REGEX)
133+
el.type = :html_element
134+
el.value = "span"
135+
el.children = list.reject(&:empty?).map do |item|
136+
if KramdownEnhancer::GITHUB_LINK_REGEX.match(item)
137+
href =
138+
if item.start_with?("GP-")
139+
"https://github.com/HMCL-dev/HMCL/pull/#{item[3..]}"
140+
else
141+
"https://github.com/HMCL-dev/HMCL/commit/#{item[3..]}"
142+
end
143+
link = Kramdown::Element.new(:a, nil, {"href": href, "target": "_blank"})
144+
link.children = [Kramdown::Element.new(:text, item, nil, :github_link => true)]
145+
link
146+
else
147+
Kramdown::Element.new(:text, item, nil, :github_link => true)
148+
end
149+
end
150+
convert_html_element(el, indent)
151+
end
152+
131153
private
132154

133155
def relative_url(input)

0 commit comments

Comments
 (0)