中位数是什么| 是故是什么意思| 头发五行属什么| 珍母口服液有什么作用| 大便绿色的是什么原因| 梦见父母是什么意思| 什么是海市蜃楼| 嗓子疼吃什么药见效最快| 石千读什么| 手脚脱皮吃什么维生素| 给男人补身体煲什么汤| 五花肉炒什么好吃| spiderman是什么意思| 尿检白细胞阳性是什么意思| ace是什么意思| 颈椎轻度退行性变是什么意思| 少许纤维灶是什么意思| ricoh什么牌子| 什么是天干地支| 俯卧撑有什么好处| 亚五行属什么| 好汉不吃眼前亏是什么意思| 白细胞中性粒细胞高是什么原因| 胸口正中间疼是什么病| 高血压能吃什么| 男人梦见蛇是什么预兆| 柜子是什么意思| 什么原因造成耳鸣| 为什么会得静脉曲张| 什么叫会车| 扁桃体结石挂什么科| ddp是什么化疗药| 一个九一个鸟念什么| 一字千金是什么生肖| 吃什么可以降血糖| 梦见麒麟是什么兆头| 是什么样的| 棉花是什么时候传入中国的| 10.28是什么星座| 3月5日是什么纪念日| 什么是人工智能| as是什么病| 嘴唇颜色深是什么原因| 什么是a货翡翠| 薄熙来为什么被抓| 静脉曲张是什么意思| 沙茶酱什么味道| 梦见猪下崽预兆什么| 为什么会做春梦| 1977年是什么年| 什么都不放的冬瓜清汤| 紧急避孕药什么时候吃最好| 腹部b超能检查什么| 夏天什么面料的衣服最舒服| 头孢不能和什么药一起吃| 喉咙痛鼻塞吃什么药| jackjones是什么品牌| 带手串有什么讲究| 扁平疣吃什么药| 含义是什么意思| 俊俏是什么意思| 三轮体空是什么意思| 来月经喝什么茶好| 心律失常是什么意思| 六十而耳顺是什么意思| 1994是什么年| 九月十号什么星座| 后脑勺疼是什么原因| 才子是什么生肖| 腋下臭是什么原因| 压箱钱是什么意思| 妇科炎症用什么药| 眼睛经常充血是什么原因引起的| 阴囊两侧瘙痒是什么原因| 膝关节弹响是什么原因| 胃蛋白酶原1偏低是什么意思| 今天是什么冲什么生肖| 1997年什么命| 台湾有什么特产最有名| 小孩经常流鼻血是什么原因| 建日是什么意思| 射手是什么象星座| 丁胺卡那又叫什么药名| 1988属什么| 为什么手臂上有很多很小的点| 天枢是什么意思| 切诺为什么要饭前半小时吃| 乳腺小叶增生是什么意思| 什么的面目| 漫谈是什么意思| 喉咙痛上火吃什么药效果最好| 马桶为什么叫马桶| ti是什么意思| 脚发痒是什么原因| 医院的特需门诊是什么意思| 下体有异味是什么原因| 闰月要给父母买什么| 什么叫艾滋病| fourone是什么牌子| 雨字五行属什么| 音爆是什么| 卡宾男装属于什么档次| 为什么青霉素要做皮试| take是什么意思| 姨妈期可以吃什么水果| 局灶癌变是什么意思| 过渡句的作用是什么| 脸书是什么| 放屁不臭是什么原因| 软化血管吃什么药最好| 什么是买手店| 煤气罐在什么情况下会爆炸| 肚子上面疼是什么原因| 豆芽和什么一起炒好吃| 月和什么有关| 心如止水是什么意思| 等是什么生肖| 西瓜对人体有什么好处| 过期蜂蜜还有什么用途| 火水是什么| 肾阴虚吃什么食物补| 弱水三千是什么意思| 私募是做什么的| 常务副省长是什么级别| 1月25号什么星座| 孕妇吃西红柿对胎儿有什么好处| 长期便秘吃什么药效果最好| 发财树用什么肥料最好| 什么洗发水好| 脖子长小肉粒是什么原因| 鱼油有什么功效| 孜孜不倦什么意思| 彩虹像什么| 谦虚的什么| 半身不遂的前兆是什么症状| 2007年属猪五行属什么| 阎王叫什么| 一热就头疼是什么原因| 巨细胞病毒是什么| 什么是贡菜| 政治庇护是什么意思| 孕妇吃什么水果对胎儿好| 插班生是什么意思| 接盘是什么意思| 拿什么不用手| hiv是什么病毒| 女性得疱疹是什么症状| 看门神是什么生肖| 己卯日五行属什么| 毛发旺盛女生什么原因引起的| 莹字五行属什么| 麸质是什么| 火眼金睛是什么生肖| 为什么要冬病夏治| 细小是什么病| 眼睛充血用什么眼药水| 什么的枝头| 天蝎座和什么星座最不配| 月经一个月来两次什么原因| 胃间质瘤为什么不建议切除| 脸上为什么长斑| 民警是干什么的| 喝竹叶水有什么好处| 小孩肚子疼是什么原因| 眼睛痒用什么眼药水好| 医院信息科是做什么| 丝袜是什么材质| ecg什么意思| eyki是什么牌子的手表| 衣字旁有什么字| 鱼吃什么食物| 羊排和什么一起炖好吃| 腊肉炒什么好吃| 山竹吃了有什么好处| 类风湿因子是什么意思| 什么是横纹肌溶解症| 为什么腿会肿| 窈窕淑女是什么意思| 为什么不能空腹喝豆浆| 住院门槛费是什么意思| 浑身没力气是什么原因| 覃读什么| 什么动听四字词语| 高晓松为什么进监狱| 梦见人头是什么征兆| 女性排卵期出血是什么原因| 字字珠玑是什么意思| 牛拉稀用什么药最快| 过火是什么意思| 医保报销是什么意思| 降压药什么时候吃最好| mac版本是什么意思| 晒背有什么好处| 马齿苋吃了有什么好处| 肺部玻璃结节是什么病| 神经疼吃什么药| 头发麻是什么病的前兆| 胸口正中间疼是什么病| 攻击的近义词是什么| 皮肤一块块白是什么病| 缺钙吃什么补钙最快| 无犯罪记录证明需要什么材料| 室上速是什么原因导致的| 年检是什么意思| 导语是什么| 自尊心是什么意思| 狗吃什么药会立马就死| 肋骨外翻挂什么科| 烂大街是什么意思| 纳粹是什么意思| 心率过缓吃什么药| 肴肉是什么肉| 粉红色泡沫样痰是什么病| 洗手指征是什么| 感冒咳嗽吃什么药好| 獭尾肝是什么意思| 虾仁炒什么菜好吃| 什么是实性结节| 红豆为什么代表相思| 暴毙是什么意思| 酉时五行属什么| 榴莲皮有什么功效| 什么叫环比| 坤宁宫是干什么的| 鲱鱼罐头为什么这么臭| 抗坏血酸是什么| 馨是什么意思| 为什么喝咖啡会心慌| 丙肝病毒抗体阴性是什么意思| 科级干部是什么级别| 鳄龟吃什么食物| 心五行属性是什么| 神经病吃什么药效果好| 拜土地公时要念什么好| 张柏芝和谢霆锋为什么离婚| 什么家门| 12月10日什么星座| 运六月有什么说法| 人生于世上有几个知己是什么歌| 比劫是什么意思| 日本是什么时候投降的| 考药师证需要什么条件| 隐匿是什么意思| 花匠是什么意思| 什么样的女人水多| mr平扫是什么检查| 马粟是什么| 车加失读什么| 血稠吃什么食物好得快| 大便是黑色的是什么原因| 做梦吃饺子是什么意思| 受是什么意思| 多莉是什么鱼| alpaca是什么意思| 糖耐是检查什么| 牛的四个胃分别叫什么| 枸杞泡水有什么功效| 12度穿什么衣服| 守望相助是什么意思| 太阳是什么星| 化名是什么意思| 拉屎有泡沫是什么原因| 人老是放屁是什么原因| 喉咙痛感冒吃什么药| 百度Pojdi na vsebino

古井贡酒60 窖龄 45度500ml 单瓶装 浓香型白酒

Iz Wikipedije, proste enciklopedije
Documentation icon Dokumentacija modula[predogled] [uredi] [zgodovina] [osve?i]
百度 在谈到这次比赛的时候,Tina表示:我非常享受这场比赛,我也尊敬我的对手,我觉得今年赛道是很有挑战性的,今年的亚军和季军都是非常有实力的选手。


Usage from wikitext

[uredi kodo]

This module cannot be used from wikitext.

Usage from Lua

[uredi kodo]
To call the module, use
local mHatList = require('Module:Hatnote list')
or similar, then access its methods through the mHatList variable (or whatever was used).

andList

[uredi kodo]

andList takes a list in table form, and returns a string with the list separated with "and" and commas as appropriate.

orList

[uredi kodo]

orList takes a list in table form, and returns a string with the list separated with "or" and commas as appropriate.

forSee

[uredi kodo]

_forSee takes three arguments: a table of trimmed arguments with blanks removed, a "from" number with the index to start at, and an options table, and returns a string with a number of "For X, see [[Y]]" sentences. The links are formatted using the methods from Module:Hatnote.

As a convenience, the forSee method (without the leading underscore) takes the same arguments except with a frame instead of an args table, using getArgs() from Module:Arguments to preprocess the arguments.

--------------------------------------------------------------------------------
--                           Module:Hatnote list                              --
--                                                                            --
-- This module produces and formats lists for use in hatnotes. In particular, --
-- it implements the for-see list, i.e. lists of "For X, see Y" statements,   --
-- as used in {{about}}, {{redirect}}, and their variants. Also introduced    --
-- are andList & orList helpers for formatting lists with those conjunctions. --
--------------------------------------------------------------------------------

local mArguments --initialize lazily
local mFormatLink = require('Modul:Format link')
local mHatnote = require('Modul:Hatnote')
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local p = {}

--------------------------------------------------------------------------------
-- List stringification helper functions
--
-- These functions are used for stringifying lists, usually page lists inside
-- the "Y" portion of "For X, see Y" for-see items.
--------------------------------------------------------------------------------

--default options table used across the list stringification functions
local stringifyListDefaultOptions = {
	conjunction = "in",
	separator = ",",
	altSeparator = ";",
	space = " ",
	formatted = false
}

--Searches display text only
local function searchDisp(haystack, needle)
	return string.find(
		string.sub(haystack, (string.find(haystack, '|') or 0) + 1), needle
	)
end

-- Stringifies a list generically; probably shouldn't be used directly
local function stringifyList(list, options)
	-- Type-checks, defaults, and a shortcut
	checkType("stringifyList", 1, list, "table")
	if #list == 0 then return nil end
	checkType("stringifyList", 2, options, "table", true)
	options = options or {}
	for k, v in pairs(stringifyListDefaultOptions) do
		if options[k] == nil then options[k] = v end
	end
	local s = options.space
	-- Format the list if requested
	if options.formatted then
		list = mFormatLink.formatPages(
			{categorizeMissing = mHatnote.missingTargetCat}, list
		)
	end
	-- Set the separator; if any item contains it, use the alternate separator
	local separator = options.separator
	for k, v in pairs(list) do
		if searchDisp(v, separator) then
			separator = options.altSeparator
			break
		end
	end
	-- Set the conjunction, apply Oxford comma, and force a comma if #1 has "§"
	local conjunction = s .. options.conjunction .. s
	-- Return the formatted string
	return mw.text.listToText(list, separator .. s, conjunction)
end

--DRY function
function p.conjList (conj, list, fmt)
	return stringifyList(list, {conjunction = conj, formatted = fmt})
end

-- Stringifies lists with "and" or "or"
function p.andList (...) return p.conjList("in", ...) end
function p.orList (...) return p.conjList("ali", ...) end

--------------------------------------------------------------------------------
-- For see
--
-- Makes a "For X, see [[Y]]." list from raw parameters. Intended for the
-- {{about}} and {{redirect}} templates and their variants.
--------------------------------------------------------------------------------

--default options table used across the forSee family of functions
local forSeeDefaultOptions = {
	andKeyword = 'in',
	title = mw.title.getCurrentTitle().text,
	otherText = 'druge pomene',
	forSeeForm = 'Za %s glej %s.',
}

--Collapses duplicate punctuation
local function punctuationCollapse (text)
	local replacements = {
		["%.%.$"] = ".",
		["%?%.$"] = "?",
		["%!%.$"] = "!",
		["%.%]%]%.$"] = ".]]",
		["%?%]%]%.$"] = "?]]",
		["%!%]%]%.$"] = "!]]"
	}
	for k, v in pairs(replacements) do text = string.gsub(text, k, v) end
	return text
end

-- Structures arguments into a table for stringification, & options
function p.forSeeArgsToTable (args, from, options)
	-- Type-checks and defaults
	checkType("forSeeArgsToTable", 1, args, 'table')
	checkType("forSeeArgsToTable", 2, from, 'number', true)
	from = from or 1
	checkType("forSeeArgsToTable", 3, options, 'table', true)
	options = options or {}
	for k, v in pairs(forSeeDefaultOptions) do
		if options[k] == nil then options[k] = v end
	end
	-- maxArg's gotten manually because getArgs() and table.maxn aren't friends
	local maxArg = 0
	for k, v in pairs(args) do
		if type(k) == 'number' and k > maxArg then maxArg = k end
	end
	-- Structure the data out from the parameter list:
	-- * forTable is the wrapper table, with forRow rows
	-- * Rows are tables of a "use" string & a "pages" table of pagename strings
	-- * Blanks are left empty for defaulting elsewhere, but can terminate list
	local forTable = {}
	local i = from
	local terminated = false
	-- If there is extra text, and no arguments are given, give nil value
	-- to not produce default of "For other uses, see foo (disambiguation)"
	if options.extratext and i > maxArg then return nil end
	-- Loop to generate rows
	repeat
		-- New empty row
		local forRow = {}
		-- On blank use, assume list's ended & break at end of this loop
		forRow.use = args[i]
		if not args[i] then terminated = true end
		-- New empty list of pages
		forRow.pages = {}
		-- Insert first pages item if present
		table.insert(forRow.pages, args[i + 1])
		-- If the param after next is "and", do inner loop to collect params
		-- until the "and"'s stop. Blanks are ignored: "1|and||and|3" → {1, 3}
		while args[i + 2] == options.andKeyword do
			if args[i + 3] then 
				table.insert(forRow.pages, args[i + 3])
			end
			-- Increment to next "and"
			i = i + 2
		end
		-- Increment to next use
		i = i + 2
		-- Append the row
		table.insert(forTable, forRow)
	until terminated or i > maxArg
	
	return forTable
end

-- Stringifies a table as formatted by forSeeArgsToTable
function p.forSeeTableToString (forSeeTable, options)
	-- Type-checks and defaults
	checkType("forSeeTableToString", 1, forSeeTable, "table", true)
	checkType("forSeeTableToString", 2, options, "table", true)
	options = options or {}
	for k, v in pairs(forSeeDefaultOptions) do
		if options[k] == nil then options[k] = v end
	end
	-- Stringify each for-see item into a list
	local strList = {}
	if forSeeTable then
		for k, v in pairs(forSeeTable) do
			local useStr = v.use or options.otherText
			local pagesStr =
				p.andList(v.pages, true) or
				mFormatLink._formatLink{
					categorizeMissing = mHatnote.missingTargetCat,
					link = mHatnote.disambiguate(options.title)
				}
			local forSeeStr = string.format(options.forSeeForm, useStr, pagesStr)
			forSeeStr = punctuationCollapse(forSeeStr)
			table.insert(strList, forSeeStr)
		end
	end
	if options.extratext then table.insert(strList, punctuationCollapse(options.extratext..'.')) end
	-- Return the concatenated list
	return table.concat(strList, ' ')
end

-- Produces a "For X, see [[Y]]" string from arguments. Expects index gaps
-- but not blank/whitespace values. Ignores named args and args < "from".
function p._forSee (args, from, options)
	local forSeeTable = p.forSeeArgsToTable(args, from, options)
	return p.forSeeTableToString(forSeeTable, options)
end

-- As _forSee, but uses the frame.
function p.forSee (frame, from, options)
	mArguments = require('Module:Arguments')
	return p._forSee(mArguments.getArgs(frame), from, options)
end

return p
92年属什么的生肖 六月是什么生肖 心脏主要由什么组织构成 黄疸高是什么原因引起的 马首是瞻是什么生肖
1.15是什么星座 梦到自己流鼻血是什么预兆 kinghome是什么牌子 花儿为什么那么红 肝脂肪浸润是什么意思
健身rm是什么意思 四肢麻木是什么病 策反是什么意思 9.15是什么星座 经常上火口腔溃疡是什么原因
什么叫窦性心律不齐 什么是黄褐斑 月经量多是什么原因导致的 为什么耳朵会痛 什么是铅中毒
水逆是什么hcv7jop6ns0r.cn 6.18是什么星座hcv9jop6ns0r.cn 晚餐吃什么zhongyiyatai.com 阿迪达斯是什么牌子hcv9jop3ns4r.cn 奶阵是什么意思beikeqingting.com
今年什么时候过年hcv9jop6ns0r.cn 脱肛和痔疮有什么区别hcv8jop0ns3r.cn 为什么地球是圆的chuanglingweilai.com 口腔医学技术可以考什么证hcv9jop4ns3r.cn wt什么意思hcv8jop4ns9r.cn
内科检查什么0297y7.com 苏州古代叫什么jiuxinfghf.com 什么地腐烂hcv8jop7ns0r.cn 尿酸高要吃什么药hcv9jop7ns2r.cn 白细胞偏高是什么原因引起的hcv8jop1ns2r.cn
误食干燥剂有什么危害hcv8jop8ns5r.cn 九月初三是什么星座hcv9jop5ns2r.cn 扁桃体炎吃什么药hcv7jop4ns6r.cn 马克定食是什么意思hcv9jop2ns7r.cn 喉咙痛不能吃什么东西hcv8jop3ns6r.cn
百度