Jump to content

Module:get IDs

Wiktionary වෙතින්

This module is used to get all the IDs on a particular page. It used currently only used by MediaWiki:Gadget-OrangeLinks.js.

{{#invoke:get IDs|show|tap|lakh|wiki|a|Appendix:Glossary}}

returns the IDs on tap, lakh, wiki, a and Appendix:Glossary separated by two newlines:

ඉංග්‍රීසි .E0.B6.89.E0.B6.82.E0.B6.9C.E0.B7.8A.E2.80.8D.E0.B6.BB.E0.B7.93.E0.B7.83.E0.B7.92 උච්චාරණය .E0.B6.8B.E0.B6.A0.E0.B7.8A.E0.B6.A0.E0.B7.8F.E0.B6.BB.E0.B6.AB.E0.B6.BA නිරුක්තිය_1 .E0.B6.B1.E0.B7.92.E0.B6.BB.E0.B7.94.E0.B6.9A.E0.B7.8A.E0.B6.AD.E0.B7.92.E0.B6.BA_1 නාම_පදය .E0.B6.B1.E0.B7.8F.E0.B6.B8_.E0.B6.B4.E0.B6.AF.E0.B6.BA ඉංග්‍රීසි:_peg ඉංග්‍රීසි:_device ඉංග්‍රීසි:_tool ව්‍යුත්පන්න_යෙදුම් .E0.B7.80.E0.B7.8A.E2.80.8D.E0.B6.BA.E0.B7.94.E0.B6.AD.E0.B7.8A.E0.B6.B4.E0.B6.B1.E0.B7.8A.E0.B6.B1_.E0.B6.BA.E0.B7.99.E0.B6.AF.E0.B7.94.E0.B6.B8.E0.B7.8A ආශ්‍රිත_යෙදුම් .E0.B6.86.E0.B7.81.E0.B7.8A.E2.80.8D.E0.B6.BB.E0.B7.92.E0.B6.AD_.E0.B6.BA.E0.B7.99.E0.B6.AF.E0.B7.94.E0.B6.B8.E0.B7.8A ක්‍රියා_පදය .E0.B6.9A.E0.B7.8A.E2.80.8D.E0.B6.BB.E0.B7.92.E0.B6.BA.E0.B7.8F_.E0.B6.B4.E0.B6.AF.E0.B6.BA Conjugation ව්‍යුත්පන්න_යෙදුම්_2 .E0.B7.80.E0.B7.8A.E2.80.8D.E0.B6.BA.E0.B7.94.E0.B6.AD.E0.B7.8A.E0.B6.B4.E0.B6.B1.E0.B7.8A.E0.B6.B1_.E0.B6.BA.E0.B7.99.E0.B6.AF.E0.B7.94.E0.B6.B8.E0.B7.8A_2 නිරුක්තිය_2 .E0.B6.B1.E0.B7.92.E0.B6.BB.E0.B7.94.E0.B6.9A.E0.B7.8A.E0.B6.AD.E0.B7.92.E0.B6.BA_2 ක්‍රියා_පදය_2 .E0.B6.9A.E0.B7.8A.E2.80.8D.E0.B6.BB.E0.B7.92.E0.B6.BA.E0.B7.8F_.E0.B6.B4.E0.B6.AF.E0.B6.BA_2 ඉංග්‍රීසි:_designate ඉංග්‍රීසි:_games ඉංග්‍රීසි:_deplete ඉංග්‍රීසි:_arrest Conjugation_2 ව්‍යුත්පන්න_යෙදුම්_3 .E0.B7.80.E0.B7.8A.E2.80.8D.E0.B6.BA.E0.B7.94.E0.B6.AD.E0.B7.8A.E0.B6.B4.E0.B6.B1.E0.B7.8A.E0.B6.B1_.E0.B6.BA.E0.B7.99.E0.B6.AF.E0.B7.94.E0.B6.B8.E0.B7.8A_3 නාම_පදය_2 .E0.B6.B1.E0.B7.8F.E0.B6.B8_.E0.B6.B4.E0.B6.AF.E0.B6.BA_2 ව්‍යුත්පන්න_යෙදුම්_4 .E0.B7.80.E0.B7.8A.E2.80.8D.E0.B6.BA.E0.B7.94.E0.B6.AD.E0.B7.8A.E0.B6.B4.E0.B6.B1.E0.B7.8A.E0.B6.B1_.E0.B6.BA.E0.B7.99.E0.B6.AF.E0.B7.94.E0.B6.B8.E0.B7.8A_4 නිරුක්තිය_3 .E0.B6.B1.E0.B7.92.E0.B6.BB.E0.B7.94.E0.B6.9A.E0.B7.8A.E0.B6.AD.E0.B7.92.E0.B6.BA_3 නාම_පදය_3 .E0.B6.B1.E0.B7.8F.E0.B6.B8_.E0.B6.B4.E0.B6.AF.E0.B6.BA_3 ව්‍යුත්පන්න_යෙදුම්_5 .E0.B7.80.E0.B7.8A.E2.80.8D.E0.B6.BA.E0.B7.94.E0.B6.AD.E0.B7.8A.E0.B6.B4.E0.B6.B1.E0.B7.8A.E0.B6.B1_.E0.B6.BA.E0.B7.99.E0.B6.AF.E0.B7.94.E0.B6.B8.E0.B7.8A_5 මූලාශ්‍ර .E0.B6.B8.E0.B7.96.E0.B6.BD.E0.B7.8F.E0.B7.81.E0.B7.8A.E2.80.8D.E0.B6.BB වැඩිදුර්_කියවීම_සඳහා .E0.B7.80.E0.B7.90.E0.B6.A9.E0.B7.92.E0.B6.AF.E0.B7.94.E0.B6.BB.E0.B7.8A_.E0.B6.9A.E0.B7.92.E0.B6.BA.E0.B7.80.E0.B7.93.E0.B6.B8_.E0.B7.83.E0.B6.B3.E0.B7.84.E0.B7.8F

ඉංග්‍රීසි .E0.B6.89.E0.B6.82.E0.B6.9C.E0.B7.8A.E2.80.8D.E0.B6.BB.E0.B7.93.E0.B7.83.E0.B7.92 නිරුක්තිය .E0.B6.B1.E0.B7.92.E0.B6.BB.E0.B7.94.E0.B6.9A.E0.B7.8A.E0.B6.AD.E0.B7.92.E0.B6.BA උච්චාරණය .E0.B6.8B.E0.B6.A0.E0.B7.8A.E0.B6.A0.E0.B7.8F.E0.B6.BB.E0.B6.AB.E0.B6.BA සංඛ්‍යාංකය .E0.B7.83.E0.B6.82.E0.B6.9B.E0.B7.8A.E2.80.8D.E0.B6.BA.E0.B7.8F.E0.B6.82.E0.B6.9A.E0.B6.BA වෙනත්_ආකාර .E0.B7.80.E0.B7.99.E0.B6.B1.E0.B6.AD.E0.B7.8A_.E0.B6.86.E0.B6.9A.E0.B7.8F.E0.B6.BB Coordinate_terms ව්‍යුත්පන්න_යෙදුම් .E0.B7.80.E0.B7.8A.E2.80.8D.E0.B6.BA.E0.B7.94.E0.B6.AD.E0.B7.8A.E0.B6.B4.E0.B6.B1.E0.B7.8A.E0.B6.B1_.E0.B6.BA.E0.B7.99.E0.B6.AF.E0.B7.94.E0.B6.B8.E0.B7.8A නාම_පදය .E0.B6.B1.E0.B7.8F.E0.B6.B8_.E0.B6.B4.E0.B6.AF.E0.B6.BA වෙනත්_ආකාර_2 .E0.B7.80.E0.B7.99.E0.B6.B1.E0.B6.AD.E0.B7.8A_.E0.B6.86.E0.B6.9A.E0.B7.8F.E0.B6.BB_2 මූලාශ්‍ර .E0.B6.B8.E0.B7.96.E0.B6.BD.E0.B7.8F.E0.B7.81.E0.B7.8A.E2.80.8D.E0.B6.BB ප්‍රංශ .E0.B6.B4.E0.B7.8A.E2.80.8D.E0.B6.BB.E0.B6.82.E0.B7.81 නිරුක්තිය_2 .E0.B6.B1.E0.B7.92.E0.B6.BB.E0.B7.94.E0.B6.9A.E0.B7.8A.E0.B6.AD.E0.B7.92.E0.B6.BA_2 උච්චාරණය_2 .E0.B6.8B.E0.B6.A0.E0.B7.8A.E0.B6.A0.E0.B7.8F.E0.B6.BB.E0.B6.AB.E0.B6.BA_2 නාම_පදය_2 .E0.B6.B1.E0.B7.8F.E0.B6.B8_.E0.B6.B4.E0.B6.AF.E0.B6.BA_2

ඉංග්‍රීසි .E0.B6.89.E0.B6.82.E0.B6.9C.E0.B7.8A.E2.80.8D.E0.B6.BB.E0.B7.93.E0.B7.83.E0.B7.92 නිරුක්තිය .E0.B6.B1.E0.B7.92.E0.B6.BB.E0.B7.94.E0.B6.9A.E0.B7.8A.E0.B6.AD.E0.B7.92.E0.B6.BA ඉංග්‍රීසි:_Q171 උච්චාරණය .E0.B6.8B.E0.B6.A0.E0.B7.8A.E0.B6.A0.E0.B7.8F.E0.B6.BB.E0.B6.AB.E0.B6.BA නාම_පදය .E0.B6.B1.E0.B7.8F.E0.B6.B8_.E0.B6.B4.E0.B6.AF.E0.B6.BA ඉංග්‍රීසි:_Q171 ව්‍යුත්පන්න_යෙදුම් .E0.B7.80.E0.B7.8A.E2.80.8D.E0.B6.BA.E0.B7.94.E0.B6.AD.E0.B7.8A.E0.B6.B4.E0.B6.B1.E0.B7.8A.E0.B6.B1_.E0.B6.BA.E0.B7.99.E0.B6.AF.E0.B7.94.E0.B6.B8.E0.B7.8A ක්‍රියා_පදය .E0.B6.9A.E0.B7.8A.E2.80.8D.E0.B6.BB.E0.B7.92.E0.B6.BA.E0.B7.8F_.E0.B6.B4.E0.B6.AF.E0.B6.BA අමතර_අවධානයට .E0.B6.85.E0.B6.B8.E0.B6.AD.E0.B6.BB_.E0.B6.85.E0.B7.80.E0.B6.B0.E0.B7.8F.E0.B6.B1.E0.B6.BA.E0.B6.A7 මූලාශ්‍ර .E0.B6.B8.E0.B7.96.E0.B6.BD.E0.B7.8F.E0.B7.81.E0.B7.8A.E2.80.8D.E0.B6.BB ජපන් .E0.B6.A2.E0.B6.B4.E0.B6.B1.E0.B7.8A රෝමානුකරණය .E0.B6.BB.E0.B7.9D.E0.B6.B8.E0.B7.8F.E0.B6.B1.E0.B7.94.E0.B6.9A.E0.B6.BB.E0.B6.AB.E0.B6.BA

ඉතාලි .E0.B6.89.E0.B6.AD.E0.B7.8F.E0.B6.BD.E0.B7.92 නිරුක්තිය_1 .E0.B6.B1.E0.B7.92.E0.B6.BB.E0.B7.94.E0.B6.9A.E0.B7.8A.E0.B6.AD.E0.B7.92.E0.B6.BA_1 උච්චාරණය .E0.B6.8B.E0.B6.A0.E0.B7.8A.E0.B6.A0.E0.B7.8F.E0.B6.BB.E0.B6.AB.E0.B6.BA අකුර .E0.B6.85.E0.B6.9A.E0.B7.94.E0.B6.BB නාමපදය .E0.B6.B1.E0.B7.8F.E0.B6.B8.E0.B6.B4.E0.B6.AF.E0.B6.BA ආශ්‍රිත .E0.B6.86.E0.B7.81.E0.B7.8A.E2.80.8D.E0.B6.BB.E0.B7.92.E0.B6.AD නිරුක්තිය_2 .E0.B6.B1.E0.B7.92.E0.B6.BB.E0.B7.94.E0.B6.9A.E0.B7.8A.E0.B6.AD.E0.B7.92.E0.B6.BA_2 Preposition italian-preposition ඉතාලි:_style භාවිත_සටහන් .E0.B6.B7.E0.B7.8F.E0.B7.80.E0.B7.92.E0.B6.AD_.E0.B7.83.E0.B6.A7.E0.B7.84.E0.B6.B1.E0.B7.8A Descendants නිරුක්තිය_3 .E0.B6.B1.E0.B7.92.E0.B6.BB.E0.B7.94.E0.B6.9A.E0.B7.8A.E0.B6.AD.E0.B7.92.E0.B6.BA_3 ක්‍රියාපදය .E0.B6.9A.E0.B7.8A.E2.80.8D.E0.B6.BB.E0.B7.92.E0.B6.BA.E0.B7.8F.E0.B6.B4.E0.B6.AF.E0.B6.BA මූලාශ්‍ර .E0.B6.B8.E0.B7.96.E0.B6.BD.E0.B7.8F.E0.B7.81.E0.B7.8A.E2.80.8D.E0.B6.BB වැඩිදුර_කියවීම_සඳහා .E0.B7.80.E0.B7.90.E0.B6.A9.E0.B7.92.E0.B6.AF.E0.B7.94.E0.B6.BB_.E0.B6.9A.E0.B7.92.E0.B6.BA.E0.B7.80.E0.B7.93.E0.B6.B8_.E0.B7.83.E0.B6.B3.E0.B7.84.E0.B7.8F

0–9 0.E2.80.939 Symbols අ .E0.B6.85 අනතීත අනතීත A a. abbreviation ablative_case ablative ablaut grade absolutive absolutive_case abstract_noun abstract_verb abstract accusative_case accusative acc. acronym active active_voice acute acute_accent AD adjective adverb adverbial adverbial_clause affix af agent_nouns agentive agent_noun agent_nouns AHD alternative_form ambitransitive_verb ambitransitive anglicisation anglicization anglicised anglicized angry_register animate animacy antepenultima antepenultimate antepenult antonym antonymous aorist aorist_tense apheresis apheretic aphaeresis aphaeretic aphesis aphetic apocopic apocope apocopate apocopated apocopation approximant archaic archaism areal areal_feature article aspect aspirated_h assimilation assimilate assimilated attributive attributively augment augmented augmentative auxiliary_verb auxiliary avoidance B back-formation back_vowel backronym backslang bahuvrihi barytone BC BCE blend bowdlerization broadly broad C c. ca. calque loan_translation calqued case category catenative catenative_verb causative causative_verb CE cf. circumlocutory CJKV CJKV classifier clause ක්ලිප්_කිරීම් clipping clitic cognate coinage coined collective collectively collective_noun colloquial c common common_gender comparable comparative compound concrete_noun concrete_verb concrete conditional conditional_mood conjugation conjunction connegative consonant consonantism construct_state contamination contraction contracted contranym conversion coordinate_term coordinative copula copulative corruption countable counter D dated dative_case dative dat declension defective defective_spelling definite degrees_of_comparison denominal dependent dependent_clause deponent derived_terms descendants descriptive desiderative determinate_verb determinate determinative determiner deverbal diachrony diachronic diachronically diacritic diacritical diacritical_mark diaeresis diaresis dieresis dialectal diminutive direct_object dissimilation dissimilate dissimilated displaced ditransitive_verb ditransitive doublet dual dual_number dummy_pronoun dvandva dysphemism E ed. elative elative_case elision elided ellipsis elongated emphatic enclisis endonym autonym endocentric enPR epenthesis epenthetic epicene eponym eponymous equative ergative_case ergative ergative_verb etymology etymon euphemism excessive_spelling excrescent exocentric exonym expletive eye_dialect eye_spelling F factitive factitive_verb false_cognate false_friend familiar f feminine figurative first_person first-person 1st_person fl. focus folk_etymology folk_etymologies folk_etymological formal fossil_word fossil fossilised fossilized fpl frequentative fricative front_vowel future_perfect future future_tense G gemination ලිංග_භේදය gender gender_neutral gender-neutral genericized_trademark genitive genitive_case gerund ghost_word grave grave_accent H habitual hapax_legomenon hapax haplology haplological hedge higher_register historical holonym homograph homophone hot_word humorous hyperbole hyperbolic hypercorrect hypercorrection hyperforeign hyperforeignism hypernym hyperthesis hyperthetic hyphenation hyponym I ideophone ideophonic idiom idiomatic imitative Imitative imparisyllabic imperfect විධි_ක්‍රියා imperative imperative_mood imperfective imperfective_aspect imperfective_past impersonal impersonal_verb inanimate indeclinable undeclinable invariable invariant indefinite independent_clause indeterminate_verb indeterminate indicative indicative_mood indirect_object infix infinitive inflected inflection inflectional informal inherited initialism inline_reference instrumental_case instrumental ins intensifier intensifying interjection internationalism intransitive_verb intransitive invariable invariant iotation IPA ʾiʿrāb irregular iterative J jussive jussive_mood K karmadharaya Katharevousa Kulturwort culture_word L learned_borrowing lemma letter_case lexeme liaison ligature linking_verb literally literary litotes loanblend loanword loan borrowed borrowing locative_case locative loc locative-qualitative_case locative-qualitative loosely loose loosely_speaking M macron macron m masculine measure_word mediopassive meiosis men's_speech meronym metaphorical metaphor metanalysis metathesis metathetic metathesise metathesize metathesised metathesized metonym metonymic metonymical metonymically middle_voice middle-voice minced_oath mixed mixed_declension monolectic monosyllable mood mpl mute_h N narrowly narrow nasal_infix negative_polarity negative_polarity_item negative_polarity negative_polarity_item negative_verb neologism n neuter nominal nominative nominative_case nominalisation nominalization substantivisation substantivization nonce nonce_word nonfinite non-finite non-past non-past_tense nonstandard nonvirile noun noun_class noun_clause number grammatical_number number O object grammatical_object oblique oblique_case objective objective_case obs obsolete OED offensive onomatopoeia onomatopoeic optative_mood orthographic_borrowing outdated oxytone oxytonic P p. palatalization palindrome paradigm paragoge paragogic parisyllabic paroxytone part_of_speech POS POS partial_calque loan_blend partially_calqued participial participle participles particle partitive partitive_case passive passive_voice past past_tense past_historic past_perfect pejorative derogatory penultima penult perfect perfective perfective_aspect periphrastic person grammatical_person phoneme phono-semantic_compound phono-semantic_matching phrase piecewise_doublet plosive pluperfect plural Plural plural_number pl pl. plurale_tantum plural_only plurale_tantum pluralia_tantum polylectic portmanteau Portmanteau positive possessional_adjective possessive_determiner possessive_adjective postpositive preconsonantal predicate predicative predicatively prefix prefixed prefixation prescriptive prevocalic preposition prepositional_case prepositional present present_tense preterite preterite-present_verb privative_adjective productive progressive pronominal_verb pronominal pronoun pronunciation_spelling proparoxytone proper_noun proscribed prothesis proverb pseudoacronym pseudo-acronym pseudoanglicism pseudo-anglicism pseudo-loan R rare reanalysis reanalysed reanalyzed rebracketing metanalysis reciprocal reconstruction reconstructed reducible reduplication reduplicated reflexive register related_terms relational relational_adjective relative relative_clause respelling retronym rhetoric rhetorical_question rhotacism rhotacization Romanization Romanisation romanization romanisation root S SAMPA script second_person second-person 2nd_person second-person-object second-person-object_form second_person_object semantic_loan semelfactive semi-learned_borrowing semivowel sentence sentence_adverb set_phrase set_expression multiword_phrase multiword_expression shortening short_form sic siglum simile simplex ඒක_වචන singular Singular singular_number sg sg. s singulative singulative_number SGV Sino-Xenic s.l. slang slavic_first_palatalization slavic_progressive_palatalization s.n. snowclone solemn sound_change sound_symbolism sound-symbolic spelling_pronunciation stem stratum strate adstratum adstrate strictly strict strong_declension strong_pronoun strong_conjugation strong_verb subject subjunctive subjunctive_mood conjunctive subordinate_clause substantive substratum substrate suffix suffixed superlative superseded superstratum superstrate supine suppletion suppletive surface_etymology surface_analysis surface equivalent_to syllable synchrony synchronic synchronically syncope syncopic syncopation syncopated syncretism synonym T tashif tatpurusa tautology tense thematicization අන්‍ය_පුරුෂ ප්‍රථම_පුරුෂ third_person third-person 3rd_person tmesis diacope tone toponym topicalized tr. tran. transferred_sense transgressive transitive_verb transitive translation_hub transliteration transnumeral transnumeral_number troponym twice-borrowed U UK umlaut unadapted_borrowing Unadapted_borrowing uncommon uncomparable uncountable Uncountable mass_noun univerbation Univerbation usage_notes V var. varia_lectio variae_lectiones variant_reading variant velar verb verbs verbal_noun verlan virile vocative vocative_case voice voiced voiceless voicing vowel vulgar W wanderwort wanderword weak_declension weak_pronoun weak_pronoun weak_verb WMF women's_speech X X-SAMPA Y Z zero-grade zero_grade


local export = {}

local parameters_module = "Module:parameters"
local string_nowiki_module = "Module:string/nowiki"
local string_utilities_module = "Module:string utilities"
local table_module = "Module:table"
local template_parser_module = "Module:template parser"

local anchor_encode = mw.uri.anchorEncode
local byte = string.byte
local concat = table.concat
local format = string.format
local get -- Defined below.
local gsub = string.gsub
local lower = string.lower
local new_title = mw.title.new
local normalize_anchor -- Defined below.
local pcall = pcall
local require = require

--[==[
Loaders for functions in other modules, which overwrite themselves with the target function when called. This ensures modules are only loaded when needed, retains the speed/convenience of locally-declared pre-loaded functions, and has no overhead after the first call, since the target functions are called directly in any subsequent calls.]==]
	local function class_else_type(...)
		class_else_type = require(template_parser_module).class_else_type
		return class_else_type(...)
	end
	
	local function decode_entities(...)
		decode_entities = require(string_utilities_module).decode_entities
		return decode_entities(...)
	end
	
	local function nowiki(...)
		nowiki = require(string_nowiki_module)
		return nowiki(...)
	end
	
	local function parse(...)
		parse = require(template_parser_module).parse
		return parse(...)
	end
	
	local function process_params(...)
		process_params = require(parameters_module).process
		return process_params(...)
	end

--[==[
Loaders for objects, which load data (or some other object) into some variable, which can then be accessed as "foo or get_foo()", where the function get_foo sets the object to "foo" and then returns it. This ensures they are only loaded when needed, and avoids the need to check for the existence of the object each time, since once "foo" has been set, "get_foo" will not be called again.]==]
	local parameters_data
	local function get_parameters_data()
		parameters_data, get_parameters_data = mw.loadData("Module:parameters/data"), nil
		return parameters_data
	end
	
	local template_names
	local function get_template_names()
		template_names = require(table_module).listToSet{
			"anchor",
			"etymid",
			"etymon",
			"senseid",
			"trans-see",
			"trans-top",
			"trans-top-also"
		}
		get_template_names = nil
		return template_names
	end

function export.normalize_anchor(str)
	return decode_entities(anchor_encode(str))
end
normalize_anchor = export.normalize_anchor

local function handle_heading(name, seen, ids)
	-- Repeated IDs are disambiguated by appending _N, where N is an
	-- incremented integer. When determining this, ASCII characters are case-
	-- insensitive, but all other characters are case-sensitive.
	local check = lower(name)
	if seen[check] then
		local i, name_lower = 1, check
		repeat
			i = i + 1
			check = name_lower .. "_" .. i
		until not seen[check]
		name = name .. "_" .. i
	end
	seen[check] = true
	ids[#ids + 1] = name
end

local function pseudo_percent_encode(ch)
	return format(".%02X", byte(ch))
end

local function handle_template(name, node, ids)
	local args, success = node:get_arguments()
	success, args = pcall(process_params, args, (parameters_data or get_parameters_data())[name])
	if not success then
		return
	elseif name == "anchor" then
		args = args[1]
		for i = 1, #args do
			ids[#ids + 1] = normalize_anchor(args[i])
		end
		return
	end
	local id1, id2
	if name == "trans-top" or name == "trans-see" or name == "trans-top-also" then
		id1 = "Translations-"
		if name == "trans-top" then
			id2 = args.id or args[1]
		else
			id2 = args.id.default or args[1]
		end
	else
		id1 = args[1]:getCanonicalName() .. ": "
		id2 = args[name == "etymon" and "id" or 2]
	end
	if id2 then
		ids[#ids + 1] = normalize_anchor(id1 .. id2)
	end
end

function export.get(pagename, force_transclusion)
	local page, seen, ids = new_title(pagename), {}, {}
	
	for node in parse((page.redirectTarget or page):getContent() or error("Could not retrieve the page content of \"" .. pagename .. "\".")):iterate_nodes() do
		local node_class = class_else_type(node)
		if node_class == "heading" then
			local name = node:get_anchor()
			if name ~= nil then
				handle_heading(name, seen, ids)
				-- Headings get a fallback ID, which uses pseudo-percent-encoding
				-- where "%" is replaced by "." (e.g. "!" is ".21").
				local name2 = gsub(name, "[^%w%-.:_]", pseudo_percent_encode)
				if name2 ~= name then
					handle_heading(name2, seen, ids)
				end
			end
		elseif node_class == "template" then
			local name = node:get_name(nil, force_transclusion)
			if (template_names or get_template_names())[name] then
				handle_template(name, node, ids)
			end
		end
	end
	
	return ids
end
get = export.get

-- Used by [[MediaWiki:Gadget-OrangeLinks.js]].
function export.show(frame)
	local output = {}
	
	for i, pagename in ipairs(frame.args) do
		output[i] = nowiki(concat(get(pagename, true), " "))
	end
	
	return concat(output, "\n\n")
end

return export
"https://si.wiktionary.org/w/index.php?title=Module:get_IDs&oldid=195920" වෙතින් සම්ප්‍රවේශනය කෙරිණි