<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://zybkcn.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AExcerpt</id>
	<title>Module:Excerpt - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://zybkcn.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AExcerpt"/>
	<link rel="alternate" type="text/html" href="https://zybkcn.com/w/index.php?title=Module:Excerpt&amp;action=history"/>
	<updated>2026-10-11T05:16:15Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://zybkcn.com/w/index.php?title=Module:Excerpt&amp;diff=54891&amp;oldid=prev</id>
		<title>WikiBot：​消息本地化：TNT 降级时用中文</title>
		<link rel="alternate" type="text/html" href="https://zybkcn.com/w/index.php?title=Module:Excerpt&amp;diff=54891&amp;oldid=prev"/>
		<updated>2026-08-01T06:52:05Z</updated>

		<summary type="html">&lt;p&gt;消息本地化：TNT 降级时用中文&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2026年8月1日 (六) 14:52的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第38行：&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第38行：&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- Helper function to get localized messages&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- Helper function to get localized messages&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local excerptMessages = {&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	[&#039;this&#039;] = &#039;这个部分&#039;,&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	[&#039;section&#039;] = &#039;这个部分&#039;,&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	[&#039;excerpt&#039;] = &#039;摘自：&#039;,&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	[&#039;more&#039;] = &#039;阅读更多……&#039;,&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function getMessage(key)&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function getMessage(key)&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local ok, TNT = pcall(require, &#039;Module:TNT&#039;)&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local ok, TNT = pcall(require, &#039;Module:TNT&#039;)&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; not&lt;/del&gt; ok then&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; return key end&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if ok then&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	&lt;/del&gt;local ok2, msg = pcall(TNT.format, &#039;I18n/Module:Excerpt.tab&#039;, key)&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		&lt;/ins&gt;local ok2, msg = pcall(TNT.format, &#039;I18n/Module:Excerpt.tab&#039;, key)&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	&lt;/del&gt;if ok2 then return msg end&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		&lt;/ins&gt;if ok2 then return msg end&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	end&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	return key&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	return excerptMessages[key] or key&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>WikiBot</name></author>
	</entry>
	<entry>
		<id>https://zybkcn.com/w/index.php?title=Module:Excerpt&amp;diff=54888&amp;oldid=prev</id>
		<title>WikiBot：​getMessage 双 pcall 容错</title>
		<link rel="alternate" type="text/html" href="https://zybkcn.com/w/index.php?title=Module:Excerpt&amp;diff=54888&amp;oldid=prev"/>
		<updated>2026-08-01T06:50:30Z</updated>

		<summary type="html">&lt;p&gt;getMessage 双 pcall 容错&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2026年8月1日 (六) 14:50的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第41行：&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第41行：&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local ok, TNT = pcall(require, &#039;Module:TNT&#039;)&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local ok, TNT = pcall(require, &#039;Module:TNT&#039;)&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if not ok then return key end&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if not ok then return key end&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;return&lt;/del&gt; TNT.format&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(&lt;/del&gt;&#039;I18n/Module:Excerpt.tab&#039;, key)&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;local&lt;/ins&gt; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ok2, msg = pcall(&lt;/ins&gt;TNT.format&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;&#039;I18n/Module:Excerpt.tab&#039;, key)&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if ok2 then return msg end&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	return key&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>WikiBot</name></author>
	</entry>
	<entry>
		<id>https://zybkcn.com/w/index.php?title=Module:Excerpt&amp;diff=54876&amp;oldid=prev</id>
		<title>鹿野耕云：​拉取适配 zhwiki Excerpt 体系</title>
		<link rel="alternate" type="text/html" href="https://zybkcn.com/w/index.php?title=Module:Excerpt&amp;diff=54876&amp;oldid=prev"/>
		<updated>2026-08-01T06:46:02Z</updated>

		<summary type="html">&lt;p&gt;拉取适配 zhwiki Excerpt 体系&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Please DO NOT directly sync with the internationalized version&lt;br /&gt;
-- Module:Excerpt implements the Excerpt template&lt;br /&gt;
-- Documentation https://www.mediawiki.org/wiki/Module:Excerpt&lt;br /&gt;
-- By User:Sophivorus, User:Certes &amp;amp; others&lt;br /&gt;
-- Version 100.0 Chinese Version&lt;br /&gt;
-- License CC-BY-SA-4.0&lt;br /&gt;
&lt;br /&gt;
local Transcluder = require(&amp;#039;Module:Transcluder&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
local yesno = require(&amp;#039;Module:Yesno&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
local ok, config = pcall(require, &amp;#039;Module:Excerpt/config&amp;#039;)&lt;br /&gt;
if not ok then config = {} end&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Helper function to get arguments&lt;br /&gt;
local args&lt;br /&gt;
function getArg(key, default)&lt;br /&gt;
	local value = args[key]&lt;br /&gt;
	if value and mw.text.trim(value) ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		return value&lt;br /&gt;
	end&lt;br /&gt;
	return default&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Helper function to handle errors&lt;br /&gt;
function getError(message, value, noError)&lt;br /&gt;
    if noError then return &amp;quot;&amp;quot; end&lt;br /&gt;
    if type(message) == &amp;#039;string&amp;#039; then&lt;br /&gt;
        message = Transcluder.getError(message, value)&lt;br /&gt;
    end&lt;br /&gt;
    if config.categories and config.categories.errors and mw.title.getCurrentTitle().isContentPage then&lt;br /&gt;
        message:node(&amp;#039;[[Category:&amp;#039; .. config.categories.errors .. &amp;#039;]]&amp;#039;)&lt;br /&gt;
    end&lt;br /&gt;
    return message&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Helper function to get localized messages&lt;br /&gt;
function getMessage(key)&lt;br /&gt;
	local ok, TNT = pcall(require, &amp;#039;Module:TNT&amp;#039;)&lt;br /&gt;
	if not ok then return key end&lt;br /&gt;
	return TNT.format(&amp;#039;I18n/Module:Excerpt.tab&amp;#039;, key)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	args = Transcluder.parseArgs(frame)&lt;br /&gt;
&lt;br /&gt;
	-- Make sure the requested page exists&lt;br /&gt;
	local page = getArg(1, getArg(&amp;#039;article&amp;#039;) )&lt;br /&gt;
	local noError = yesno( getArg(&amp;#039;noerror&amp;#039;, false) )&lt;br /&gt;
	if not page then return getError(&amp;#039;no-page&amp;#039;, nil, noError) end&lt;br /&gt;
	local title = mw.title.new(page)&lt;br /&gt;
	if not title then return getError(&amp;#039;no-page&amp;#039;) end&lt;br /&gt;
	if title.isRedirect then title = title.redirectTarget end&lt;br /&gt;
	if not title.exists then return getError(&amp;#039;page-not-found&amp;#039;, page, noError) end&lt;br /&gt;
	page = title.prefixedText&lt;br /&gt;
&lt;br /&gt;
	-- Set variables from the template parameters&lt;br /&gt;
	local link=getArg(&amp;#039;link&amp;#039;)&lt;br /&gt;
	local fragment = getArg(&amp;#039;fragment&amp;#039;)&lt;br /&gt;
	local section = fragment or getArg(2, getArg(&amp;#039;section&amp;#039;,mw.ustring.match( getArg(1, getArg(&amp;#039;article&amp;#039;) ), &amp;#039;[^#]+#(.+)&amp;#039;) ) )&lt;br /&gt;
	local dd = yesno( getArg(&amp;#039;dd&amp;#039;, false) )  -- （冒號開頭的）描述列表&lt;br /&gt;
	local hat = yesno( getArg(&amp;#039;hat&amp;#039;, true) ) or dd  -- 頂注&lt;br /&gt;
	local edit = yesno( getArg(&amp;#039;edit&amp;#039;, true) )&lt;br /&gt;
	local this = getArg(&amp;#039;this&amp;#039;)&lt;br /&gt;
	local only = getArg(&amp;#039;only&amp;#039;) or (dd and &amp;#039;paragraphs&amp;#039;) or nil&lt;br /&gt;
	local files = getArg(&amp;#039;files&amp;#039;, getArg(&amp;#039;file&amp;#039;, ( only == &amp;#039;file&amp;#039; and 1 ) ) )&lt;br /&gt;
	local lists = getArg(&amp;#039;lists&amp;#039;, getArg(&amp;#039;list&amp;#039;, ( only == &amp;#039;list&amp;#039; and 1 ) ) )&lt;br /&gt;
	local tables = getArg(&amp;#039;tables&amp;#039;, getArg(&amp;#039;table&amp;#039;, ( only == &amp;#039;table&amp;#039; and 1 ) ) )&lt;br /&gt;
	local templates = getArg(&amp;#039;templates&amp;#039;, getArg(&amp;#039;template&amp;#039;, ( only == &amp;#039;template&amp;#039; and 1 ) ) )&lt;br /&gt;
	local paragraphs = getArg(&amp;#039;paragraphs&amp;#039;, getArg(&amp;#039;paragraph&amp;#039;, ( only == &amp;#039;paragraph&amp;#039; and 1 ) ) )&lt;br /&gt;
	local references = getArg(&amp;#039;references&amp;#039;)&lt;br /&gt;
	local subsections = not yesno( getArg(&amp;#039;subsections&amp;#039;) )&lt;br /&gt;
	local noBold = not yesno( getArg(&amp;#039;bold&amp;#039;) )&lt;br /&gt;
	local freefiles = yesno( getArg(&amp;#039;freefiles&amp;#039;) )&lt;br /&gt;
	local inline = yesno( getArg(&amp;#039;inline&amp;#039;) )  -- 行內模式&lt;br /&gt;
	local quote = yesno( getArg(&amp;#039;quote&amp;#039;) )&lt;br /&gt;
	local more = yesno( getArg(&amp;#039;more&amp;#039;) )&lt;br /&gt;
	local class = getArg(&amp;#039;class&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
	-- Build the hatnote&lt;br /&gt;
	if hat and not inline then&lt;br /&gt;
		if this then&lt;br /&gt;
			hat = this&lt;br /&gt;
		elseif quote then&lt;br /&gt;
			hat = getMessage(&amp;#039;this&amp;#039;)&lt;br /&gt;
		elseif only then&lt;br /&gt;
			hat = getMessage(only)&lt;br /&gt;
		else&lt;br /&gt;
			hat = getMessage(&amp;#039;section&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
		hat = hat .. getMessage(&amp;#039;excerpt&amp;#039;)&lt;br /&gt;
		if link then&lt;br /&gt;
			hat = hat .. link&lt;br /&gt;
		elseif section and not fragment then&lt;br /&gt;
			hat = hat .. &amp;#039;[[:&amp;#039; .. page .. &amp;#039;#&amp;#039; .. mw.uri.anchorEncode(section) .. &amp;#039;|&amp;#039; .. page&lt;br /&gt;
				.. &amp;#039; § &amp;#039; .. mw.ustring.gsub(section, &amp;#039;%[%[([^]|]+)|?[^]]*%]%]&amp;#039;, &amp;#039;%1&amp;#039;) .. &amp;#039;]]&amp;#039;-- remove nested links&lt;br /&gt;
		else&lt;br /&gt;
			hat = hat .. &amp;#039;[[:&amp;#039; .. page .. &amp;#039;|&amp;#039; .. page .. &amp;#039;]]&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		if edit then&lt;br /&gt;
			hat = hat .. &amp;#039;&amp;lt;span class=&amp;quot;mw-editsection-like plainlinks&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-editsection-bracket&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;[&amp;#039;&lt;br /&gt;
			hat = hat .. title:fullUrl(&amp;#039;action=edit&amp;#039;) .. &amp;#039; &amp;#039; .. mw.message.new(&amp;#039;editsection&amp;#039;):plain()&lt;br /&gt;
			hat = hat .. &amp;#039;]&amp;lt;span class=&amp;quot;mw-editsection-bracket&amp;quot;&amp;gt;]&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		if config.hat then&lt;br /&gt;
			hat = config.hat .. hat .. &amp;#039;}}&amp;#039;&lt;br /&gt;
			hat = frame:preprocess(hat)&lt;br /&gt;
		else&lt;br /&gt;
			hat = mw.html.create(&amp;#039;div&amp;#039;):addClass(&amp;#039;dablink excerpt-hat&amp;#039;):wikitext(hat)&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		hat = nil&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Build the &amp;quot;Read more&amp;quot; link&lt;br /&gt;
	if more and not inline then&lt;br /&gt;
		more = &amp;quot;&amp;#039;&amp;#039;&amp;#039;[[&amp;quot; .. page .. &amp;#039;#&amp;#039; .. (section or &amp;#039;&amp;#039;) .. &amp;quot;|&amp;quot; .. getMessage(&amp;#039;more&amp;#039;) .. &amp;quot;]]&amp;#039;&amp;#039;&amp;#039;&amp;quot;&lt;br /&gt;
		more = mw.html.create(&amp;#039;div&amp;#039;):addClass(&amp;#039;noprint excerpt-more&amp;#039;):wikitext(more)&lt;br /&gt;
	else&lt;br /&gt;
		more = nil&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Build the options for Module:Transcluder out of the template parameters and the desired defaults&lt;br /&gt;
	local options = {&lt;br /&gt;
		files = files,&lt;br /&gt;
		lists = lists,&lt;br /&gt;
		tables = tables,&lt;br /&gt;
		paragraphs = paragraphs,&lt;br /&gt;
		sections = subsections,&lt;br /&gt;
		categories = 0,&lt;br /&gt;
		references = references,&lt;br /&gt;
		only = only and mw.text.trim(only, &amp;#039;s&amp;#039;) .. &amp;#039;s&amp;#039;,&lt;br /&gt;
		noBold = noBold,&lt;br /&gt;
		noSelfLinks = true,&lt;br /&gt;
		noNonFreeFiles = freefiles,&lt;br /&gt;
		noBehaviorSwitches = true,&lt;br /&gt;
		fixReferences = true,&lt;br /&gt;
		linkBold = true,&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	-- Get the excerpt itself&lt;br /&gt;
	local title = page .. &amp;#039;#&amp;#039; .. (section or &amp;#039;&amp;#039;)&lt;br /&gt;
	local ok, excerpt = pcall(Transcluder.get, title, options)&lt;br /&gt;
	if not ok then return getError(excerpt, nil, noError) end&lt;br /&gt;
	if mw.text.trim(excerpt) == &amp;#039;&amp;#039; and not only then&lt;br /&gt;
		if section then return getError(&amp;#039;section-empty&amp;#039;, section, noError) else return getError(&amp;#039;lead-empty&amp;#039;, nil, noError) end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- If no file was found, try to get one from the infobox&lt;br /&gt;
	local fileNamespaces = Transcluder.getNamespaces(&amp;#039;File&amp;#039;)&lt;br /&gt;
	if ((only == &amp;#039;file&amp;#039; or only == &amp;#039;files&amp;#039;) or (not only and (files ~= &amp;#039;0&amp;#039; or not files))) and -- caller asked for files&lt;br /&gt;
		not Transcluder.matchAny(excerpt, &amp;#039;%[%[&amp;#039;, fileNamespaces, &amp;#039;:&amp;#039;) and -- and there are no files in Transcluder&amp;#039;s output&lt;br /&gt;
		config.captions -- and we have the config option required to try finding files in templates&lt;br /&gt;
	then&lt;br /&gt;
		-- We cannot distinguish the infobox from the other templates so we search them all&lt;br /&gt;
		local infobox = Transcluder.getTemplates(excerpt);&lt;br /&gt;
		infobox = table.concat(infobox)&lt;br /&gt;
		local parameters = Transcluder.getParameters(infobox)&lt;br /&gt;
		local file, captions, caption&lt;br /&gt;
		for _, pair in pairs(config.captions) do&lt;br /&gt;
			file = pair[1]&lt;br /&gt;
			file = parameters[file]&lt;br /&gt;
			if file and Transcluder.matchAny(file, &amp;#039;^.*%.&amp;#039;, {&amp;#039;[Jj][Pp][Ee]?[Gg]&amp;#039;,&amp;#039;[Pp][Nn][Gg]&amp;#039;,&amp;#039;[Gg][Ii][Ff]&amp;#039;,&amp;#039;[Ss][Vv][Gg]&amp;#039;}, &amp;#039;.*&amp;#039;) then&lt;br /&gt;
				file = mw.ustring.match(file, &amp;#039;%[?%[?.-:([^{|]+)%]?%]?&amp;#039;) or file -- [[File:Example.jpg{{!}}upright=1.5]] to Example.jpg&lt;br /&gt;
				captions = pair[2]&lt;br /&gt;
				for _, p in pairs(captions) do&lt;br /&gt;
					if parameters[p] then caption = parameters[p] break end&lt;br /&gt;
				end&lt;br /&gt;
				excerpt = &amp;#039;[[File:&amp;#039; .. file .. &amp;#039;|thumb|&amp;#039; .. (caption or &amp;#039;&amp;#039;) .. &amp;#039;]]&amp;#039; .. excerpt&lt;br /&gt;
				if ( freefiles ) then&lt;br /&gt;
					excerpt = Transcluder.removeNonFreeFiles(excerpt)&lt;br /&gt;
				end&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Unlike other elements, templates are filtered here&lt;br /&gt;
	-- because we had to search the infoboxes for files&lt;br /&gt;
	local trash&lt;br /&gt;
	if only and (only == &amp;#039;template&amp;#039; or only == &amp;#039;templates&amp;#039;) then&lt;br /&gt;
		trash, excerpt = Transcluder.getTemplates(excerpt, templates);&lt;br /&gt;
	else -- Remove blacklisted templates&lt;br /&gt;
		local blacklist = config.blacklist and table.concat(config.blacklist, &amp;#039;,&amp;#039;) or &amp;#039;&amp;#039;&lt;br /&gt;
		if templates then&lt;br /&gt;
			if string.sub(templates, 1, 1) == &amp;#039;-&amp;#039; then --Unwanted templates. Append to blacklist&lt;br /&gt;
				blacklist = templates .. &amp;#039;,&amp;#039; .. blacklist&lt;br /&gt;
			else --Wanted templates. Replaces blacklist and acts as whitelist&lt;br /&gt;
				blacklist = templates&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			blacklist = &amp;#039;-&amp;#039; .. blacklist&lt;br /&gt;
		end&lt;br /&gt;
		trash, excerpt = Transcluder.getTemplates(excerpt, blacklist);&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local oneparexcerpt=false&lt;br /&gt;
	&lt;br /&gt;
	-- Remove extra line breaks but leave one before and after so the parser interprets lists, tables, etc. correctly&lt;br /&gt;
	excerpt = mw.text.trim(excerpt)&lt;br /&gt;
	if dd then&lt;br /&gt;
		excerpt = string.gsub(excerpt, &amp;#039;\n\n+&amp;#039;, &amp;#039;\n&amp;#039;)&lt;br /&gt;
		-- add colon to the beginning of each paragraph&lt;br /&gt;
		excerpt = string.gsub(excerpt, &amp;#039;\n&amp;#039;, &amp;#039;\n:&amp;#039;)&lt;br /&gt;
	else&lt;br /&gt;
		excerpt = string.gsub(excerpt, &amp;#039;\n\n\n+&amp;#039;, &amp;#039;\n\n&amp;#039;)&lt;br /&gt;
		if (string.find (excerpt, &amp;#039;\n\n&amp;#039;)==nil) then&lt;br /&gt;
			oneparexcerpt=true&lt;br /&gt;
		end&lt;br /&gt;
		excerpt = &amp;#039;\n&amp;#039; .. excerpt .. &amp;#039;\n&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Remove nested categories&lt;br /&gt;
	excerpt = frame:preprocess(excerpt)&lt;br /&gt;
	local categories, excerpt = Transcluder.getCategories(excerpt, options.categories)&lt;br /&gt;
&lt;br /&gt;
	-- Add tracking categories&lt;br /&gt;
	if config.categories then&lt;br /&gt;
		local contentCategory = config.categories.content&lt;br /&gt;
		if contentCategory and mw.title.getCurrentTitle().isContentPage then&lt;br /&gt;
			excerpt = excerpt .. &amp;#039;[[Category:&amp;#039; .. contentCategory .. &amp;#039;]]&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		local namespaceCategory = config.categories[ mw.title.getCurrentTitle().namespace ]&lt;br /&gt;
		if namespaceCategory then&lt;br /&gt;
			excerpt = excerpt .. &amp;#039;[[Category:&amp;#039; .. namespaceCategory .. &amp;#039;]]&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	excerpt = excerpt .. &amp;#039;\n&amp;lt;span class=&amp;quot;nothing&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;#039; --强迫最后一段能成为段落&lt;br /&gt;
&lt;br /&gt;
	-- （冒號開頭的）描述列表&lt;br /&gt;
	if dd then&lt;br /&gt;
		-- 嵌套在dd中直接輸出&lt;br /&gt;
		return mw.html.create(&amp;#039;dd&amp;#039;):wikitext(excerpt)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Load the styles&lt;br /&gt;
	local styles&lt;br /&gt;
	if config.styles then&lt;br /&gt;
		styles = frame:extensionTag( &amp;#039;templatestyles&amp;#039;, &amp;#039;&amp;#039;, { src = config.styles } )&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local createp=false&lt;br /&gt;
&lt;br /&gt;
	-- Combine and return the elements&lt;br /&gt;
	local tag1 = &amp;#039;div&amp;#039;&lt;br /&gt;
	local tag2 = &amp;#039;div&amp;#039;&lt;br /&gt;
	if inline then&lt;br /&gt;
		tag1 = &amp;#039;span&amp;#039;&lt;br /&gt;
		tag2 = &amp;#039;span&amp;#039;&lt;br /&gt;
	elseif quote then&lt;br /&gt;
		tag2 = &amp;#039;blockquote&amp;#039;&lt;br /&gt;
	elseif oneparexcerpt then&lt;br /&gt;
		createp=true&lt;br /&gt;
	end&lt;br /&gt;
	if createp then&lt;br /&gt;
		excerpt = mw.html.create(&amp;#039;p&amp;#039;):wikitext(excerpt)&lt;br /&gt;
		excerpt = mw.html.create(tag1):addClass(&amp;#039;excerpt&amp;#039;):node(excerpt)&lt;br /&gt;
	else&lt;br /&gt;
		excerpt = mw.html.create(tag1):addClass(&amp;#039;excerpt&amp;#039;):wikitext(excerpt)&lt;br /&gt;
	end&lt;br /&gt;
	local block = mw.html.create(tag2):addClass(&amp;#039;excerpt-block&amp;#039;):addClass(class)&lt;br /&gt;
	return block:node(styles):node(hat):node(excerpt):node(more)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Entry points for backwards compatibility&lt;br /&gt;
function p.lead(frame) return p.main(frame) end&lt;br /&gt;
function p.excerpt(frame) return p.main(frame) end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>鹿野耕云</name></author>
	</entry>
</feed>