<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://ml.sayahna.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AUnbulleted_list</id>
	<title>Module:Unbulleted list - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://ml.sayahna.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AUnbulleted_list"/>
	<link rel="alternate" type="text/html" href="http://ml.sayahna.org/index.php?title=Module:Unbulleted_list&amp;action=history"/>
	<updated>2026-04-23T19:03:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.5</generator>
	<entry>
		<id>http://ml.sayahna.org/index.php?title=Module:Unbulleted_list&amp;diff=12757&amp;oldid=prev</id>
		<title>Cvr: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://ml.sayahna.org/index.php?title=Module:Unbulleted_list&amp;diff=12757&amp;oldid=prev"/>
		<updated>2014-08-22T07:52:37Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 07:52, 22 August 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Cvr</name></author>
		
	</entry>
	<entry>
		<id>http://ml.sayahna.org/index.php?title=Module:Unbulleted_list&amp;diff=12756&amp;oldid=prev</id>
		<title>Cvr: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://ml.sayahna.org/index.php?title=Module:Unbulleted_list&amp;diff=12756&amp;oldid=prev"/>
		<updated>2014-04-10T09:02:22Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 09:02, 10 April 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Cvr</name></author>
		
	</entry>
	<entry>
		<id>http://ml.sayahna.org/index.php?title=Module:Unbulleted_list&amp;diff=794&amp;oldid=prev</id>
		<title>Admin: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://ml.sayahna.org/index.php?title=Module:Unbulleted_list&amp;diff=794&amp;oldid=prev"/>
		<updated>2014-03-08T04:52:49Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 04:52, 8 March 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://ml.sayahna.org/index.php?title=Module:Unbulleted_list&amp;diff=793&amp;oldid=prev</id>
		<title>Mr. Stradivarius: Changed protection level of Module:Unbulleted list: High-risk Lua module: allow template editors ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite))</title>
		<link rel="alternate" type="text/html" href="http://ml.sayahna.org/index.php?title=Module:Unbulleted_list&amp;diff=793&amp;oldid=prev"/>
		<updated>2013-11-14T21:53:37Z</updated>

		<summary type="html">&lt;p&gt;Changed protection level of Module:Unbulleted list: &lt;a href=&quot;http://en.wikipedia.org/wiki/Lua/Modules&quot; class=&quot;extiw&quot; title=&quot;wikipedia:Lua/Modules&quot;&gt;High-risk Lua module&lt;/a&gt;: allow template editors ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite))&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module implements {{unbulleted list}} and {{hlist}}.&lt;br /&gt;
&lt;br /&gt;
local function getListItem( data, style, itemStyle )&lt;br /&gt;
    if not data then&lt;br /&gt;
        return nil&lt;br /&gt;
    end&lt;br /&gt;
    if style or itemStyle then&lt;br /&gt;
        style = style or ''&lt;br /&gt;
        itemStyle = itemStyle or ''&lt;br /&gt;
        return mw.ustring.format(&lt;br /&gt;
            '&amp;lt;li style=&amp;quot;%s%s&amp;quot;&amp;gt;%s&amp;lt;/li&amp;gt;',&lt;br /&gt;
            style, itemStyle, data&lt;br /&gt;
        )&lt;br /&gt;
    else&lt;br /&gt;
        return mw.ustring.format(&lt;br /&gt;
            '&amp;lt;li&amp;gt;%s&amp;lt;/li&amp;gt;',&lt;br /&gt;
            data&lt;br /&gt;
        )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getArgNums( args )&lt;br /&gt;
    -- Returns an array containing the keys of all positional arguments&lt;br /&gt;
    -- that contain data (i.e. non-whitespace values).&lt;br /&gt;
    local nums = {}&lt;br /&gt;
    for k, v in pairs( args ) do&lt;br /&gt;
        if type( k ) == 'number' and &lt;br /&gt;
            k &amp;gt;= 1 and &lt;br /&gt;
            math.floor( k ) == k and &lt;br /&gt;
            mw.ustring.match( v, '%S' ) then&lt;br /&gt;
                table.insert( nums, k )&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    table.sort( nums )&lt;br /&gt;
    return nums&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getClass( listType, class )&lt;br /&gt;
    local classes = {}&lt;br /&gt;
    if listType == 'hlist' then&lt;br /&gt;
        table.insert( classes, 'hlist' )&lt;br /&gt;
    end&lt;br /&gt;
    table.insert( classes, 'plainlist' )&lt;br /&gt;
    table.insert( classes, class )&lt;br /&gt;
    local ret&lt;br /&gt;
    if #classes == 0 then&lt;br /&gt;
        return nil&lt;br /&gt;
    end&lt;br /&gt;
    return mw.ustring.format( ' class=&amp;quot;%s&amp;quot;', table.concat( classes, ' ' ) )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getStyle( listType, indent, style )&lt;br /&gt;
    local styles = {}&lt;br /&gt;
    if listType == 'hlist' then&lt;br /&gt;
        indent = indent and tonumber( indent )&lt;br /&gt;
        indent = tostring( ( indent and indent * 1.6 ) or 0 )&lt;br /&gt;
        table.insert( styles, 'margin-left: ' .. indent .. 'em;' )&lt;br /&gt;
    end&lt;br /&gt;
    table.insert( styles, style )&lt;br /&gt;
    if #styles == 0 then&lt;br /&gt;
        return nil&lt;br /&gt;
    end&lt;br /&gt;
    return mw.ustring.format( ' style=&amp;quot;%s&amp;quot;', table.concat( styles, ' ' ) )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function buildList( args, listType )&lt;br /&gt;
    local listItems = {}&lt;br /&gt;
    local argNums = getArgNums( args )&lt;br /&gt;
    for i, num in ipairs( argNums ) do&lt;br /&gt;
        local item = getListItem(&lt;br /&gt;
            args[ num ],&lt;br /&gt;
            args.li_style,&lt;br /&gt;
            args[ 'li_style' .. tostring( num ) ]&lt;br /&gt;
        )&lt;br /&gt;
        table.insert( listItems, item )&lt;br /&gt;
    end&lt;br /&gt;
    if #listItems == 0 then&lt;br /&gt;
        return ''&lt;br /&gt;
    end&lt;br /&gt;
    local class = getClass( listType, args.class ) or ''&lt;br /&gt;
    local style = getStyle( listType, args.indent, args.style ) or ''&lt;br /&gt;
    local ulStyle = ( args.ul_style and ( ' style=&amp;quot;' .. args.ul_style .. '&amp;quot;' ) ) or ''&lt;br /&gt;
    return mw.ustring.format( &lt;br /&gt;
        '&amp;lt;div%s%s&amp;gt;&amp;lt;ul%s&amp;gt;%s&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;',&lt;br /&gt;
        class, style, ulStyle, table.concat( listItems )&lt;br /&gt;
    )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function makeWrapper( listType )&lt;br /&gt;
    return function( frame )&lt;br /&gt;
        local origArgs&lt;br /&gt;
        if frame == mw.getCurrentFrame() then&lt;br /&gt;
            origArgs = frame:getParent().args&lt;br /&gt;
            for k, v in pairs( frame.args ) do&lt;br /&gt;
                origArgs = frame.args&lt;br /&gt;
                break&lt;br /&gt;
            end&lt;br /&gt;
        else&lt;br /&gt;
            origArgs = frame&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        local args = {}&lt;br /&gt;
        for k, v in pairs( origArgs ) do&lt;br /&gt;
            if type( k ) == 'number' or v ~= '' then&lt;br /&gt;
                args[ k ] = v&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
        return buildList( args, listType )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return {&lt;br /&gt;
    hlist = makeWrapper( 'hlist' ),&lt;br /&gt;
    unbulleted = makeWrapper( 'unbulleted' )&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Mr. Stradivarius</name></author>
		
	</entry>
</feed>