<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://bsd.neuroinf.jp/w/index.php?action=history&amp;feed=atom&amp;title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%3AHTMLParser</id>
	<title>モジュール:HTMLParser - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://bsd.neuroinf.jp/w/index.php?action=history&amp;feed=atom&amp;title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%3AHTMLParser"/>
	<link rel="alternate" type="text/html" href="https://bsd.neuroinf.jp/w/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:HTMLParser&amp;action=history"/>
	<updated>2026-04-15T06:22:16Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://bsd.neuroinf.jp/w/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:HTMLParser&amp;diff=44212&amp;oldid=prev</id>
		<title>WikiSysop: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://bsd.neuroinf.jp/w/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:HTMLParser&amp;diff=44212&amp;oldid=prev"/>
		<updated>2020-07-13T01:10:36Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&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;ja&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;2020年7月13日 (月) 10:10時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wiki-mw_:diff:1.41:old-44211:rev-44212 --&gt;
&lt;/table&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>https://bsd.neuroinf.jp/w/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:HTMLParser&amp;diff=44211&amp;oldid=prev</id>
		<title>bsd&gt;Rillke: ←Created page with &#039;--[[ 	(The MIT license) 	Copyright (c) 2013, Wouter Scherphof (wouter.scherphof@gmail.com) 	Permission is hereby granted, free of charge, to any person obtainin...&#039;</title>
		<link rel="alternate" type="text/html" href="https://bsd.neuroinf.jp/w/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:HTMLParser&amp;diff=44211&amp;oldid=prev"/>
		<updated>2013-11-21T13:01:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/w/index.php?title=COM:AES&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;COM:AES (存在しないページ)&quot;&gt;←&lt;/a&gt;Created page with &amp;#039;--[[ 	(The MIT license) 	Copyright (c) 2013, Wouter Scherphof (wouter.scherphof@gmail.com) 	Permission is hereby granted, free of charge, to any person obtainin...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--[[&lt;br /&gt;
	(The MIT license)&lt;br /&gt;
	Copyright (c) 2013, Wouter Scherphof (wouter.scherphof@gmail.com)&lt;br /&gt;
	Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &amp;quot;Software&amp;quot;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:&lt;br /&gt;
	The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.&lt;br /&gt;
	THE SOFTWARE IS PROVIDED &amp;quot;AS IS&amp;quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.&lt;br /&gt;
--]]&lt;br /&gt;
&lt;br /&gt;
-- Source: https://github.com/wscherphof/lua-htmlparser/tree/master/src&lt;br /&gt;
&lt;br /&gt;
local ElementNode = require(&amp;quot;Module:HTMLParser/ElementNode&amp;quot;)&lt;br /&gt;
local voidelements = require(&amp;quot;Module:HTMLParser/voidelements&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
local HtmlParser = {}&lt;br /&gt;
&lt;br /&gt;
local function parse(text)&lt;br /&gt;
  local root = ElementNode:new(text)&lt;br /&gt;
&lt;br /&gt;
  local node, descend, tpos, opentags = root, true, 1, {}&lt;br /&gt;
  while true do&lt;br /&gt;
    local openstart, name&lt;br /&gt;
    openstart, tpos, name = string.find(root._text,&lt;br /&gt;
      &amp;quot;&amp;lt;&amp;quot; .. -- an uncaptured starting &amp;quot;&amp;lt;&amp;quot;&lt;br /&gt;
      &amp;quot;(%w+)&amp;quot; .. -- name = the first word, directly following the &amp;quot;&amp;lt;&amp;quot;&lt;br /&gt;
      &amp;quot;[^&amp;gt;]*&amp;gt;&amp;quot;, -- include, but not capture everything up to the next &amp;quot;&amp;gt;&amp;quot;&lt;br /&gt;
    tpos)&lt;br /&gt;
    if not name then break end&lt;br /&gt;
    local tag = ElementNode:new(name, node, descend, openstart, tpos)&lt;br /&gt;
    node = tag&lt;br /&gt;
&lt;br /&gt;
    local tagst, apos = tag:gettext(), 1&lt;br /&gt;
    while true do&lt;br /&gt;
      local start, k, eq, quote, v&lt;br /&gt;
      start, apos, k, eq, quote = string.find(tagst,&lt;br /&gt;
        &amp;quot;%s+&amp;quot; .. -- some uncaptured space&lt;br /&gt;
        &amp;quot;([^%s=/&amp;gt;]+)&amp;quot; .. -- k = an unspaced string up to an optional &amp;quot;=&amp;quot; or the &amp;quot;/&amp;quot; or &amp;quot;&amp;gt;&amp;quot;&lt;br /&gt;
        &amp;quot;(=?)&amp;quot; .. -- eq = the optional; &amp;quot;=&amp;quot;, else &amp;quot;&amp;quot;&lt;br /&gt;
        &amp;quot;([&amp;#039;\&amp;quot;]?)&amp;quot;, -- quote = an optional &amp;quot;&amp;#039;&amp;quot; or &amp;#039;&amp;quot;&amp;#039; following the &amp;quot;=&amp;quot;, or &amp;quot;&amp;quot;&lt;br /&gt;
      apos)&lt;br /&gt;
      if not k or k == &amp;quot;/&amp;gt;&amp;quot; or k == &amp;quot;&amp;gt;&amp;quot; then break end&lt;br /&gt;
      if eq == &amp;quot;=&amp;quot; then&lt;br /&gt;
        local pattern = &amp;quot;=([^%s&amp;gt;]*)&amp;quot;&lt;br /&gt;
        if quote ~= &amp;quot;&amp;quot; then&lt;br /&gt;
          pattern = quote .. &amp;quot;([^&amp;quot; .. quote .. &amp;quot;]*)&amp;quot; .. quote&lt;br /&gt;
        end&lt;br /&gt;
        start, apos, v = string.find(tagst, pattern, apos)&lt;br /&gt;
      end&lt;br /&gt;
      tag:addattribute(k, v or &amp;quot;&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    if voidelements[string.lower(tag.name)] then&lt;br /&gt;
      descend = false&lt;br /&gt;
      tag:close()&lt;br /&gt;
    else&lt;br /&gt;
      opentags[tag.name] = opentags[tag.name] or {}&lt;br /&gt;
      table.insert(opentags[tag.name], tag)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local closeend = tpos&lt;br /&gt;
    while true do&lt;br /&gt;
      local closestart, closing, closename&lt;br /&gt;
      closestart, closeend, closing, closename = string.find(root._text, &amp;quot;[^&amp;lt;]*&amp;lt;(/?)(%w+)&amp;quot;, closeend)&lt;br /&gt;
      if not closing or closing == &amp;quot;&amp;quot; then break end&lt;br /&gt;
      tag = table.remove(opentags[closename])&lt;br /&gt;
      closestart = string.find(root._text, &amp;quot;&amp;lt;&amp;quot;, closestart)&lt;br /&gt;
      tag:close(closestart, closeend + 1)&lt;br /&gt;
      node = tag.parent&lt;br /&gt;
      descend = true&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  return root&lt;br /&gt;
end&lt;br /&gt;
HtmlParser.parse = parse&lt;br /&gt;
&lt;br /&gt;
return HtmlParser&lt;/div&gt;</summary>
		<author><name>bsd&gt;Rillke</name></author>
	</entry>
</feed>