<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://turgenev.cloudfree.jp/mw-new/mw143/index.php?action=history&amp;feed=atom&amp;title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki</id>
	<title>フィルターされたNotionページによるMediaWiki - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://turgenev.cloudfree.jp/mw-new/mw143/index.php?action=history&amp;feed=atom&amp;title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki"/>
	<link rel="alternate" type="text/html" href="https://turgenev.cloudfree.jp/mw-new/mw143/index.php?title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki&amp;action=history"/>
	<updated>2026-04-26T18:57:28Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://turgenev.cloudfree.jp/mw-new/mw143/index.php?title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki&amp;diff=313&amp;oldid=prev</id>
		<title>Turgenev: Notion-MW</title>
		<link rel="alternate" type="text/html" href="https://turgenev.cloudfree.jp/mw-new/mw143/index.php?title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki&amp;diff=313&amp;oldid=prev"/>
		<updated>2025-04-02T07:04:00Z</updated>

		<summary type="html">&lt;p&gt;Notion-MW&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;2025年4月2日 (水) 16:04時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l37&quot;&gt;37行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;37行目:&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;大まかな流れは以下の通り。&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;大まかな流れは以下の通り。&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;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;上記データベースの内容をNotion APIから取得する。以下、各行ごとに処理。&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;上記データベースの内容をNotion APIから取得する。以下、各行ごとに処理。&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;ページの内容を取得し、黄色い見出しだけ残す変換を行う。Notionのブロックのリストができる&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;ページの内容を取得し、黄色い見出しだけ残す変換を行う。Notionのブロックのリストができる&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;notion&amp;amp;#45;to&amp;amp;#45;mdのblocksToMarkdownでマークダウン形式に変換する。&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;notion&amp;amp;#45;to&amp;amp;#45;mdのblocksToMarkdownでマークダウン形式に変換する。&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;いくつか前処理を行う。&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;いくつか前処理を行う。&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;pandocを用いてMediaWikiに変換する。&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;pandocを用いてMediaWikiに変換する。&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;いくつか後処理（整形）を行う&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;いくつか後処理（整形）を行う&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;完成した記事データをMediaWiki APIで投稿する。&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;完成した記事データをMediaWiki APIで投稿する。&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;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;その他、ページのリネーム、新規作成時のIDの反映（&amp;lt;code&amp;gt;&amp;amp;#45;&amp;lt;/code&amp;gt;を数字に変える）、既存の記事を新規作成しようとした場合のエラーなど、前後に多少の処理がある。&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;その他、ページのリネーム、新規作成時のIDの反映（&amp;lt;code&amp;gt;&amp;amp;#45;&amp;lt;/code&amp;gt;を数字に変える）、既存の記事を新規作成しようとした場合のエラーなど、前後に多少の処理がある。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Turgenev</name></author>
	</entry>
	<entry>
		<id>https://turgenev.cloudfree.jp/mw-new/mw143/index.php?title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki&amp;diff=250&amp;oldid=prev</id>
		<title>Turgenev: Notion-MW</title>
		<link rel="alternate" type="text/html" href="https://turgenev.cloudfree.jp/mw-new/mw143/index.php?title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki&amp;diff=250&amp;oldid=prev"/>
		<updated>2024-01-01T04:10:05Z</updated>

		<summary type="html">&lt;p&gt;Notion-MW&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;2024年1月1日 (月) 13:10時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l96&quot;&gt;96行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;96行目:&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;上記のような良い感じのMediaWikiに変換する目的と、単純にできたばかりでバグが多いため、色々変えている。&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;上記のような良い感じのMediaWikiに変換する目的と、単純にできたばかりでバグが多いため、色々変えている。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;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;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;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;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== リポジトリ ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;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;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;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;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[https://github.com/ge9/notion-to-md-mediawiki Githubリポジトリ]を作成したので、最新情報はそちらから。&lt;/ins&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;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;=== 数式関連 ===&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;=== 数式関連 ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Turgenev</name></author>
	</entry>
	<entry>
		<id>https://turgenev.cloudfree.jp/mw-new/mw143/index.php?title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki&amp;diff=173&amp;oldid=prev</id>
		<title>Turgenev: Notion-MW</title>
		<link rel="alternate" type="text/html" href="https://turgenev.cloudfree.jp/mw-new/mw143/index.php?title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki&amp;diff=173&amp;oldid=prev"/>
		<updated>2023-11-24T12:33:15Z</updated>

		<summary type="html">&lt;p&gt;Notion-MW&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;2023年11月24日 (金) 21:33時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l64&quot;&gt;64行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;64行目:&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;=== pandocの実行 ===&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;=== pandocの実行 ===&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;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;&amp;lt;syntaxhighlight lang=&quot;python&quot;&amp;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;&amp;lt;syntaxhighlight lang=&quot;python&quot;&amp;gt;cp.spawn(&quot;pandoc&quot;, [&quot;-f&quot;,&quot;gfm&quot;,&quot;-t&quot;, &quot;mediawiki&quot;, &quot;--shift-heading-level-by=1&quot;]);&amp;lt;/syntaxhighlight&amp;gt;&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;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;python&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;cp.spawn(&quot;pandoc&quot;, [&quot;-f&quot;,&quot;gfm&quot;,&quot;-t&quot;, &quot;mediawiki&quot;, &quot;--shift-heading-level-by=1&quot;]);&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;&amp;lt;code&amp;gt;gfm&amp;lt;/code&amp;gt;（Github Flavored Markdown）から&amp;lt;code&amp;gt;mediawiki&amp;lt;/code&amp;gt;に変換する。&amp;lt;code&amp;gt;&amp;amp;#45;&amp;amp;#45;shift&amp;amp;#45;heading&amp;amp;#45;level&amp;amp;#45;by&amp;amp;#61;1&amp;lt;/code&amp;gt;は、[https://www.mediawiki.org/wiki/Help:Formatting/ja Help&amp;amp;#58;書式整形 &amp;amp;#45; MediaWiki]にもある通り、MediaWikiの記事内ではレベル1の見出しは非推奨だからである。&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;&amp;lt;code&amp;gt;gfm&amp;lt;/code&amp;gt;（Github Flavored Markdown）から&amp;lt;code&amp;gt;mediawiki&amp;lt;/code&amp;gt;に変換する。&amp;lt;code&amp;gt;&amp;amp;#45;&amp;amp;#45;shift&amp;amp;#45;heading&amp;amp;#45;level&amp;amp;#45;by&amp;amp;#61;1&amp;lt;/code&amp;gt;は、[https://www.mediawiki.org/wiki/Help:Formatting/ja Help&amp;amp;#58;書式整形 &amp;amp;#45; MediaWiki]にもある通り、MediaWikiの記事内ではレベル1の見出しは非推奨だからである。&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;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l120&quot;&gt;120行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;117行目:&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;コードにおいて、言語がpythonなどの良く知られたものに設定されていると、pandocによって&amp;lt;strong&amp;gt;syntaxhighlight&amp;lt;/strong&amp;gt;タグに変えられてしまう。今回はSyntaxHightlight拡張機能が無効のMediaWikiを使っているので、言語にダミー文字列を付加する（付加ではなくダミー文字列だけにしても変わらないが、情報を落とすのは勿体ない気がしたので）。またpandoc側の問題で&amp;lt;code&amp;gt;visual basic&amp;lt;/code&amp;gt;のように言語名にスペースが入っていると&amp;lt;code&amp;gt;visual&amp;lt;/code&amp;gt;だけになってしまうようなので、スペースをアンダースコアに置換。&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;コードにおいて、言語がpythonなどの良く知られたものに設定されていると、pandocによって&amp;lt;strong&amp;gt;syntaxhighlight&amp;lt;/strong&amp;gt;タグに変えられてしまう。今回はSyntaxHightlight拡張機能が無効のMediaWikiを使っているので、言語にダミー文字列を付加する（付加ではなくダミー文字列だけにしても変わらないが、情報を落とすのは勿体ない気がしたので）。またpandoc側の問題で&amp;lt;code&amp;gt;visual basic&amp;lt;/code&amp;gt;のように言語名にスペースが入っていると&amp;lt;code&amp;gt;visual&amp;lt;/code&amp;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;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; 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;&amp;lt;syntaxhighlight lang=&quot;python&quot;&amp;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;&amp;lt;syntaxhighlight lang=&quot;python&quot;&amp;gt;language = &quot;dummy_str_&quot;+language?.replace(&quot; &quot;, &quot;_&quot;);//for MediaWiki without SyntaxHightlight extension&amp;lt;/syntaxhighlight&amp;gt;&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;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;python&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;language = &quot;dummy_str_&quot;+language?.replace(&quot; &quot;, &quot;_&quot;);//for MediaWiki without SyntaxHightlight extension&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;&amp;lt;span id=&amp;quot;notion&amp;amp;#45;to&amp;amp;#45;mdts内&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&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;&amp;lt;span id=&amp;quot;notion&amp;amp;#45;to&amp;amp;#45;mdts内&amp;quot;&amp;gt;&amp;lt;/span&amp;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;=== &amp;lt;code&amp;gt;notion&amp;amp;#45;to&amp;amp;#45;md.ts&amp;lt;/code&amp;gt;内 ===&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;=== &amp;lt;code&amp;gt;notion&amp;amp;#45;to&amp;amp;#45;md.ts&amp;lt;/code&amp;gt;内 ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l133&quot;&gt;133行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;127行目:&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;解説が面倒なのでコードだけとりあえず。&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;解説が面倒なのでコードだけとりあえず。&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;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;&amp;lt;syntaxhighlight lang=&quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;python&lt;/del&gt;&quot;&amp;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;&amp;lt;syntaxhighlight lang=&quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;javascript&lt;/ins&gt;&quot;&amp;gt;//`のみcodeに変え、```は```のままという仕様の場合&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;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;javascript&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;//`のみcodeに変え、```は```のままという仕様の場合&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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 (content.type === &amp;quot;text&amp;quot;){&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 (content.type === &amp;quot;text&amp;quot;){&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 (type == &amp;quot;code&amp;quot;){&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 (type == &amp;quot;code&amp;quot;){&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Turgenev</name></author>
	</entry>
	<entry>
		<id>https://turgenev.cloudfree.jp/mw-new/mw143/index.php?title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki&amp;diff=145&amp;oldid=prev</id>
		<title>Turgenev: Notion-MW</title>
		<link rel="alternate" type="text/html" href="https://turgenev.cloudfree.jp/mw-new/mw143/index.php?title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki&amp;diff=145&amp;oldid=prev"/>
		<updated>2023-11-24T12:02:41Z</updated>

		<summary type="html">&lt;p&gt;Notion-MW&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;2023年11月24日 (金) 21:02時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l64&quot;&gt;64行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;64行目:&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;=== pandocの実行 ===&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;=== pandocの実行 ===&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;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;&amp;lt;syntaxhighlight lang=&quot;cp.spawn(&quot;pandoc&quot;, [&quot;-f&quot;,&quot;gfm&quot;,&quot;-t&quot;, &quot;mediawiki&quot;, &quot;--shift-heading-level-by=1&quot;]);&amp;lt;/syntaxhighlight&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&amp;gt;&lt;/del&gt;&amp;lt;code&amp;gt;gfm&amp;lt;/code&amp;gt;（Github Flavored Markdown）から&amp;lt;code&amp;gt;mediawiki&amp;lt;/code&amp;gt;に変換する。&amp;lt;code&amp;gt;&amp;amp;#45;&amp;amp;#45;shift&amp;amp;#45;heading&amp;amp;#45;level&amp;amp;#45;by&amp;amp;#61;1&amp;lt;/code&amp;gt;は、[https://www.mediawiki.org/wiki/Help:Formatting/ja Help&amp;amp;#58;書式整形 &amp;amp;#45; MediaWiki]にもある通り、MediaWikiの記事内ではレベル1の見出しは非推奨だからである。&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;&amp;lt;syntaxhighlight lang=&quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;python&quot;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;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 colspan=&quot;2&quot; class=&quot;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;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;python&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;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;cp.spawn(&quot;pandoc&quot;, [&quot;-f&quot;,&quot;gfm&quot;,&quot;-t&quot;, &quot;mediawiki&quot;, &quot;--shift-heading-level-by=1&quot;]);&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;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;&amp;lt;code&amp;gt;gfm&amp;lt;/code&amp;gt;（Github Flavored Markdown）から&amp;lt;code&amp;gt;mediawiki&amp;lt;/code&amp;gt;に変換する。&amp;lt;code&amp;gt;&amp;amp;#45;&amp;amp;#45;shift&amp;amp;#45;heading&amp;amp;#45;level&amp;amp;#45;by&amp;amp;#61;1&amp;lt;/code&amp;gt;は、[https://www.mediawiki.org/wiki/Help:Formatting/ja Help&amp;amp;#58;書式整形 &amp;amp;#45; MediaWiki]にもある通り、MediaWikiの記事内ではレベル1の見出しは非推奨だからである。&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;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;=== 画像 ===&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;=== 画像 ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l116&quot;&gt;116行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;120行目:&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;コードにおいて、言語がpythonなどの良く知られたものに設定されていると、pandocによって&amp;lt;strong&amp;gt;syntaxhighlight&amp;lt;/strong&amp;gt;タグに変えられてしまう。今回はSyntaxHightlight拡張機能が無効のMediaWikiを使っているので、言語にダミー文字列を付加する（付加ではなくダミー文字列だけにしても変わらないが、情報を落とすのは勿体ない気がしたので）。またpandoc側の問題で&amp;lt;code&amp;gt;visual basic&amp;lt;/code&amp;gt;のように言語名にスペースが入っていると&amp;lt;code&amp;gt;visual&amp;lt;/code&amp;gt;だけになってしまうようなので、スペースをアンダースコアに置換。&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;コードにおいて、言語がpythonなどの良く知られたものに設定されていると、pandocによって&amp;lt;strong&amp;gt;syntaxhighlight&amp;lt;/strong&amp;gt;タグに変えられてしまう。今回はSyntaxHightlight拡張機能が無効のMediaWikiを使っているので、言語にダミー文字列を付加する（付加ではなくダミー文字列だけにしても変わらないが、情報を落とすのは勿体ない気がしたので）。またpandoc側の問題で&amp;lt;code&amp;gt;visual basic&amp;lt;/code&amp;gt;のように言語名にスペースが入っていると&amp;lt;code&amp;gt;visual&amp;lt;/code&amp;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;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; 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;&amp;lt;syntaxhighlight lang=&quot;language = &quot;dummy_str_&quot;+language?.replace(&quot; &quot;, &quot;_&quot;);//for MediaWiki without SyntaxHightlight extension&amp;lt;/syntaxhighlight&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&amp;gt;&lt;/del&gt;&amp;lt;span id=&quot;notion&amp;amp;#45;to&amp;amp;#45;mdts内&quot;&amp;gt;&amp;lt;/span&amp;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;&amp;lt;syntaxhighlight lang=&quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;python&quot;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;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 colspan=&quot;2&quot; class=&quot;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;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;python&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;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;language = &quot;dummy_str_&quot;+language?.replace(&quot; &quot;, &quot;_&quot;);//for MediaWiki without SyntaxHightlight extension&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;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;&amp;lt;span id=&quot;notion&amp;amp;#45;to&amp;amp;#45;mdts内&quot;&amp;gt;&amp;lt;/span&amp;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;=== &amp;lt;code&amp;gt;notion&amp;amp;#45;to&amp;amp;#45;md.ts&amp;lt;/code&amp;gt;内 ===&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;=== &amp;lt;code&amp;gt;notion&amp;amp;#45;to&amp;amp;#45;md.ts&amp;lt;/code&amp;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;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 colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l125&quot;&gt;125行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;133行目:&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;解説が面倒なのでコードだけとりあえず。&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;解説が面倒なのでコードだけとりあえず。&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;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;&amp;lt;syntaxhighlight lang=&quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;javascript&lt;/del&gt;&quot;&amp;gt;//`のみcodeに変え、```は```のままという仕様の場合&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;&amp;lt;syntaxhighlight lang=&quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;python&lt;/ins&gt;&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;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 colspan=&quot;2&quot; class=&quot;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;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;javascript&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;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;//`のみcodeに変え、```は```のままという仕様の場合&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 (content.type === &amp;quot;text&amp;quot;){&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 (content.type === &amp;quot;text&amp;quot;){&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 (type == &amp;quot;code&amp;quot;){&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 (type == &amp;quot;code&amp;quot;){&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Turgenev</name></author>
	</entry>
	<entry>
		<id>https://turgenev.cloudfree.jp/mw-new/mw143/index.php?title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki&amp;diff=122&amp;oldid=prev</id>
		<title>Turgenev: Notion-MW</title>
		<link rel="alternate" type="text/html" href="https://turgenev.cloudfree.jp/mw-new/mw143/index.php?title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki&amp;diff=122&amp;oldid=prev"/>
		<updated>2023-11-24T10:55:06Z</updated>

		<summary type="html">&lt;p&gt;Notion-MW&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;2023年11月24日 (金) 19:55時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l64&quot;&gt;64行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;64行目:&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;=== pandocの実行 ===&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;=== pandocの実行 ===&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;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;&amp;lt;syntaxhighlight lang=&quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;python&quot;&amp;gt;&lt;/del&gt;cp.spawn(&quot;pandoc&quot;, [&quot;-f&quot;,&quot;gfm&quot;,&quot;-t&quot;, &quot;mediawiki&quot;, &quot;--shift-heading-level-by=1&quot;]);&amp;lt;/syntaxhighlight&amp;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;&amp;lt;syntaxhighlight lang=&quot;cp.spawn(&quot;pandoc&quot;, [&quot;-f&quot;,&quot;gfm&quot;,&quot;-t&quot;, &quot;mediawiki&quot;, &quot;--shift-heading-level-by=1&quot;]);&amp;lt;/syntaxhighlight&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&amp;gt;&lt;/ins&gt;&amp;lt;code&amp;gt;gfm&amp;lt;/code&amp;gt;（Github Flavored Markdown）から&amp;lt;code&amp;gt;mediawiki&amp;lt;/code&amp;gt;に変換する。&amp;lt;code&amp;gt;&amp;amp;#45;&amp;amp;#45;shift&amp;amp;#45;heading&amp;amp;#45;level&amp;amp;#45;by&amp;amp;#61;1&amp;lt;/code&amp;gt;は、[https://www.mediawiki.org/wiki/Help:Formatting/ja Help&amp;amp;#58;書式整形 &amp;amp;#45; MediaWiki]にもある通り、MediaWikiの記事内ではレベル1の見出しは非推奨だからである。&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;&amp;lt;code&amp;gt;gfm&amp;lt;/code&amp;gt;（Github Flavored Markdown）から&amp;lt;code&amp;gt;mediawiki&amp;lt;/code&amp;gt;に変換する。&amp;lt;code&amp;gt;&amp;amp;#45;&amp;amp;#45;shift&amp;amp;#45;heading&amp;amp;#45;level&amp;amp;#45;by&amp;amp;#61;1&amp;lt;/code&amp;gt;は、[https://www.mediawiki.org/wiki/Help:Formatting/ja Help&amp;amp;#58;書式整形 &amp;amp;#45; MediaWiki]にもある通り、MediaWikiの記事内ではレベル1の見出しは非推奨だからである。&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;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;=== 画像 ===&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;=== 画像 ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l117&quot;&gt;117行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;116行目:&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;コードにおいて、言語がpythonなどの良く知られたものに設定されていると、pandocによって&amp;lt;strong&amp;gt;syntaxhighlight&amp;lt;/strong&amp;gt;タグに変えられてしまう。今回はSyntaxHightlight拡張機能が無効のMediaWikiを使っているので、言語にダミー文字列を付加する（付加ではなくダミー文字列だけにしても変わらないが、情報を落とすのは勿体ない気がしたので）。またpandoc側の問題で&amp;lt;code&amp;gt;visual basic&amp;lt;/code&amp;gt;のように言語名にスペースが入っていると&amp;lt;code&amp;gt;visual&amp;lt;/code&amp;gt;だけになってしまうようなので、スペースをアンダースコアに置換。&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;コードにおいて、言語がpythonなどの良く知られたものに設定されていると、pandocによって&amp;lt;strong&amp;gt;syntaxhighlight&amp;lt;/strong&amp;gt;タグに変えられてしまう。今回はSyntaxHightlight拡張機能が無効のMediaWikiを使っているので、言語にダミー文字列を付加する（付加ではなくダミー文字列だけにしても変わらないが、情報を落とすのは勿体ない気がしたので）。またpandoc側の問題で&amp;lt;code&amp;gt;visual basic&amp;lt;/code&amp;gt;のように言語名にスペースが入っていると&amp;lt;code&amp;gt;visual&amp;lt;/code&amp;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;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; 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;&amp;lt;syntaxhighlight lang=&quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;python&quot;&amp;gt;&lt;/del&gt;language = &quot;dummy_str_&quot;+language?.replace(&quot; &quot;, &quot;_&quot;);//for MediaWiki without SyntaxHightlight extension&amp;lt;/syntaxhighlight&amp;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;&amp;lt;syntaxhighlight lang=&quot;language = &quot;dummy_str_&quot;+language?.replace(&quot; &quot;, &quot;_&quot;);//for MediaWiki without SyntaxHightlight extension&amp;lt;/syntaxhighlight&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&amp;gt;&lt;/ins&gt;&amp;lt;span id=&quot;notion&amp;amp;#45;to&amp;amp;#45;mdts内&quot;&amp;gt;&amp;lt;/span&amp;gt;&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;&amp;lt;span id=&quot;notion&amp;amp;#45;to&amp;amp;#45;mdts内&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;=== &amp;lt;code&amp;gt;notion&amp;amp;#45;to&amp;amp;#45;md.ts&amp;lt;/code&amp;gt;内 ===&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;=== &amp;lt;code&amp;gt;notion&amp;amp;#45;to&amp;amp;#45;md.ts&amp;lt;/code&amp;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;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>Turgenev</name></author>
	</entry>
	<entry>
		<id>https://turgenev.cloudfree.jp/mw-new/mw143/index.php?title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki&amp;diff=55&amp;oldid=prev</id>
		<title>Turgenev: Notion-MW</title>
		<link rel="alternate" type="text/html" href="https://turgenev.cloudfree.jp/mw-new/mw143/index.php?title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki&amp;diff=55&amp;oldid=prev"/>
		<updated>2023-11-24T00:27:44Z</updated>

		<summary type="html">&lt;p&gt;Notion-MW&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;2023年11月24日 (金) 09:27時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l64&quot;&gt;64行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;64行目:&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;=== pandocの実行 ===&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;=== pandocの実行 ===&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;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;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre class&lt;/del&gt;=&quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;dummy_str_python&lt;/del&gt;&quot;&amp;gt;cp.spawn(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;pandoc&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;, [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;-f&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;gfm&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;-t&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;mediawiki&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;--shift-heading-level-by=1&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;]);&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/del&gt;&amp;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;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight lang&lt;/ins&gt;=&quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;python&lt;/ins&gt;&quot;&amp;gt;cp.spawn(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;pandoc&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;, [&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;-f&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;gfm&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;-t&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;mediawiki&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;--shift-heading-level-by=1&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;]);&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;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;&amp;lt;code&amp;gt;gfm&amp;lt;/code&amp;gt;（Github Flavored Markdown）から&amp;lt;code&amp;gt;mediawiki&amp;lt;/code&amp;gt;に変換する。&amp;lt;code&amp;gt;&amp;amp;#45;&amp;amp;#45;shift&amp;amp;#45;heading&amp;amp;#45;level&amp;amp;#45;by&amp;amp;#61;1&amp;lt;/code&amp;gt;は、[https://www.mediawiki.org/wiki/Help:Formatting/ja Help&amp;amp;#58;書式整形 &amp;amp;#45; MediaWiki]にもある通り、MediaWikiの記事内ではレベル1の見出しは非推奨だからである。&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;&amp;lt;code&amp;gt;gfm&amp;lt;/code&amp;gt;（Github Flavored Markdown）から&amp;lt;code&amp;gt;mediawiki&amp;lt;/code&amp;gt;に変換する。&amp;lt;code&amp;gt;&amp;amp;#45;&amp;amp;#45;shift&amp;amp;#45;heading&amp;amp;#45;level&amp;amp;#45;by&amp;amp;#61;1&amp;lt;/code&amp;gt;は、[https://www.mediawiki.org/wiki/Help:Formatting/ja Help&amp;amp;#58;書式整形 &amp;amp;#45; MediaWiki]にもある通り、MediaWikiの記事内ではレベル1の見出しは非推奨だからである。&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;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l117&quot;&gt;117行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;117行目:&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;コードにおいて、言語がpythonなどの良く知られたものに設定されていると、pandocによって&amp;lt;strong&amp;gt;syntaxhighlight&amp;lt;/strong&amp;gt;タグに変えられてしまう。今回はSyntaxHightlight拡張機能が無効のMediaWikiを使っているので、言語にダミー文字列を付加する（付加ではなくダミー文字列だけにしても変わらないが、情報を落とすのは勿体ない気がしたので）。またpandoc側の問題で&amp;lt;code&amp;gt;visual basic&amp;lt;/code&amp;gt;のように言語名にスペースが入っていると&amp;lt;code&amp;gt;visual&amp;lt;/code&amp;gt;だけになってしまうようなので、スペースをアンダースコアに置換。&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;コードにおいて、言語がpythonなどの良く知られたものに設定されていると、pandocによって&amp;lt;strong&amp;gt;syntaxhighlight&amp;lt;/strong&amp;gt;タグに変えられてしまう。今回はSyntaxHightlight拡張機能が無効のMediaWikiを使っているので、言語にダミー文字列を付加する（付加ではなくダミー文字列だけにしても変わらないが、情報を落とすのは勿体ない気がしたので）。またpandoc側の問題で&amp;lt;code&amp;gt;visual basic&amp;lt;/code&amp;gt;のように言語名にスペースが入っていると&amp;lt;code&amp;gt;visual&amp;lt;/code&amp;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;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; 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;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre class&lt;/del&gt;=&quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;dummy_str_python&lt;/del&gt;&quot;&amp;gt;language = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;dummy_str_&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;+language?.replace(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot; &amp;amp;quot;&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;_&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;);//for MediaWiki without SyntaxHightlight extension&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/del&gt;&amp;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;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight lang&lt;/ins&gt;=&quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;python&lt;/ins&gt;&quot;&amp;gt;language = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;dummy_str_&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;+language?.replace(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot; &quot;&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;_&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;);//for MediaWiki without SyntaxHightlight extension&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;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;&amp;lt;span id=&amp;quot;notion&amp;amp;#45;to&amp;amp;#45;mdts内&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&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;&amp;lt;span id=&amp;quot;notion&amp;amp;#45;to&amp;amp;#45;mdts内&amp;quot;&amp;gt;&amp;lt;/span&amp;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;=== &amp;lt;code&amp;gt;notion&amp;amp;#45;to&amp;amp;#45;md.ts&amp;lt;/code&amp;gt;内 ===&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;=== &amp;lt;code&amp;gt;notion&amp;amp;#45;to&amp;amp;#45;md.ts&amp;lt;/code&amp;gt;内 ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l127&quot;&gt;127行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;127行目:&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;解説が面倒なのでコードだけとりあえず。&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;解説が面倒なのでコードだけとりあえず。&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;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;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre class&lt;/del&gt;=&quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;dummy_str_javascript&lt;/del&gt;&quot;&amp;gt;//`のみcodeに変え、```は```のままという仕様の場合&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;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight lang&lt;/ins&gt;=&quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;javascript&lt;/ins&gt;&quot;&amp;gt;//`のみcodeに変え、```は```のままという仕様の場合&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 (content.type === &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;text&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&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 (content.type === &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;text&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;){&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 (type == &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;code&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&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 (type == &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;code&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;){&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;&amp;amp;lt;&amp;amp;gt;&lt;/del&gt;は無効なので本来は不要だが、detailsまわりが修正されるまで、&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;lt;&amp;amp;gt;&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;               //```の内部では&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;&amp;gt;&lt;/ins&gt;は無効なので本来は不要だが、detailsまわりが修正されるまで、&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;&amp;gt;&lt;/ins&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;               //無事修正されたので、対象外に&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;               //無事修正されたので、対象外に&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;               //plain_text =  plain_text.replace(/[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;lt;&amp;amp;gt;&lt;/del&gt;]/g, (c) =&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;gt;&amp;amp;quot;&lt;/del&gt;m_esc_&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot; &lt;/del&gt;+ c.charCodeAt(0)+&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;_m&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&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;               //plain_text =  plain_text.replace(/[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;&amp;gt;&lt;/ins&gt;]/g, (c) =&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;&quot;&lt;/ins&gt;m_esc_&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot; &lt;/ins&gt;+ c.charCodeAt(0)+&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;_m&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&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;               //バッククォートはmarkdownの```の中でも有害になる珍しい文字であるが、外側と対処法が異なる。&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;               //バッククォートはmarkdownの```の中でも有害になる珍しい文字であるが、外側と対処法が異なる。&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;               //markdownでコード内に`を書くには、両側をそれより多い`で囲うしかなく（\`や&amp;amp;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;amp;&lt;/del&gt;#96;ではそれがそのまま表示されてしまう）、その実装が面倒である。&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;               //markdownでコード内に`を書くには、両側をそれより多い`で囲うしかなく（\`や&amp;amp;#96;ではそれがそのまま表示されてしまう）、その実装が面倒である。&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;               //そこで、最強エスケープをかけて、MediaWikiに変換してから元に戻す。ちなみにMediaWikiでは`は特殊文字ではないのでエスケープ文字ではなくベタ書きに戻す。&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;               //そこで、最強エスケープをかけて、MediaWikiに変換してから元に戻す。ちなみにMediaWikiでは`は特殊文字ではないのでエスケープ文字ではなくベタ書きに戻す。&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;               plain_text =  plain_text.replace(/`/g, (c) =&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;gt; &amp;amp;quot;&lt;/del&gt;m_esc_&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot; &lt;/del&gt;+ c.charCodeAt(0)+&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;_m&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&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;               plain_text =  plain_text.replace(/`/g, (c) =&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt; &quot;&lt;/ins&gt;m_esc_&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot; &lt;/ins&gt;+ c.charCodeAt(0)+&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;_m&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&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;                &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;                &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;             }else{//テキストエリア&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;             }else{//テキストエリア&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;               //以下は、MediaWikiの特殊文字であるにもかかわらずpandocがそのままべた書きしてしまう文字。最強エスケープが必要。&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;               //以下は、MediaWikiの特殊文字であるにもかかわらずpandocがそのままべた書きしてしまう文字。最強エスケープが必要。&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;               //これらはMarkdownの```およびMediaWikiのpreの内側では無害である。（外側では特殊文字であるものとそうでないものがある。）&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;               //これらはMarkdownの```およびMediaWikiのpreの内側では無害である。（外側では特殊文字であるものとそうでないものがある。）&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;               plain_text = plain_text.replace(/[=;:#*&#039;{}~\-\[\]]/g, (c) =&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;gt; &amp;amp;quot;&lt;/del&gt;m_esc_&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot; &lt;/del&gt;+ c.charCodeAt(0)+&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;_m&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&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;               plain_text = plain_text.replace(/[=;:#*&#039;{}~\-\[\]]/g, (c) =&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt; &quot;&lt;/ins&gt;m_esc_&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot; &lt;/ins&gt;+ c.charCodeAt(0)+&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;_m&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&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;                &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;                &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;               //これらは、Markdownのテキストエリアでは特殊文字だが、MediaWikiの特殊文字ではないあるいはpandocがちゃんと扱えるもの。&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;               //これらは、Markdownのテキストエリアでは特殊文字だが、MediaWikiの特殊文字ではないあるいはpandocがちゃんと扱えるもの。&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;&amp;amp;quot;&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;（ピリオド）のみ、「リンクテキストもURLになっているリンク及びcode内に書かれた（リンクでない）URLがpandocの変換でおかしくなるのを防ぐ」という目的で入れている。）&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;&quot;&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;（ピリオド）のみ、「リンクテキストもURLになっているリンク及びcode内に書かれた（リンクでない）URLがpandocの変換でおかしくなるのを防ぐ」という目的で入れている。）&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;               //この変換は先ほどの最強エスケープより後でなければいけない。（#が最強エスケープされるのを防ぐため）（もちろん同時でもいい）&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;               //この変換は先ほどの最強エスケープより後でなければいけない。（#が最強エスケープされるのを防ぐため）（もちろん同時でもいい）&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;&amp;amp;lt;&lt;/del&gt;`でバグったことがあった（おそらくpandocのせい）ので、&amp;amp;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;amp;&lt;/del&gt;#xx;を使用&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;&amp;lt;&lt;/ins&gt;`でバグったことがあった（おそらくpandocのせい）ので、&amp;amp;#xx;を使用&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;               plain_text = plain_text.replace(/[`$+&amp;amp;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;amp;&amp;amp;lt;&amp;amp;gt;&lt;/del&gt;\\.]/g, (c) =&amp;amp;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;gt; &amp;amp;quot;&amp;amp;amp;&lt;/del&gt;#&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot; &lt;/del&gt;+ c.charCodeAt(0)+&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;;&amp;amp;quot&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;               plain_text = plain_text.replace(/[`$+&amp;amp;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;&amp;gt;&lt;/ins&gt;\\.]/g, (c) =&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt; &quot;&lt;/ins&gt;&amp;amp;#&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot; &lt;/ins&gt;+ c.charCodeAt(0)+&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&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;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; 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;               //2つ以上の連続する空白文字は（そのように表示したい特別な理由があると考えて）&amp;amp;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;amp;&lt;/del&gt;nbsp;に変換。これは&amp;amp;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;amp;&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;               //2つ以上の連続する空白文字は（そのように表示したい特別な理由があると考えて）&amp;amp;nbsp;に変換。これは&amp;amp;のエスケープより後である必要がある。&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;               plain_text = plain_text.replace(/ {2,}/g, (c) =&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;gt; &lt;/del&gt;c.split(&#039;&#039;).map(function() { return &#039;&amp;amp;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;amp;&lt;/del&gt;nbsp;&#039;; }).join(&#039;&#039;))&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;               plain_text = plain_text.replace(/ {2,}/g, (c) =&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt; &lt;/ins&gt;c.split(&#039;&#039;).map(function() { return &#039;&amp;amp;nbsp;&#039;; }).join(&#039;&#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;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;               //notion-to-mdがブロック内改行に対応していないので対応。nbspへの変換より後に行う。&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;               //notion-to-mdがブロック内改行に対応していないので対応。nbspへの変換より後に行う。&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;               plain_text = plain_text.replace(/\n/g, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot; &lt;/del&gt; \n&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&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;               plain_text = plain_text.replace(/\n/g, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot; &lt;/ins&gt; \n&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&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;             }&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;             }&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;&amp;amp;quot;&lt;/del&gt;も、mediawikiでの特殊文字ではないが、pandocでは&amp;amp;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;amp;&lt;/del&gt;quot;に変換される。&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;&quot;&lt;/ins&gt;も、mediawikiでの特殊文字ではないが、pandocでは&amp;amp;quot;に変換される。&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;             //ベタ書きでも表示には影響ないが、span id=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&amp;amp;quot;&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;             //ベタ書きでも表示には影響ないが、span id=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&quot;&lt;/ins&gt;の中身に生のダブルクォーテーションが入ってしまう副作用があるし、その他問題が起きる可能性がある。&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;             //下記のように最強エスケープすればそのまま書けるが、&amp;amp;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;amp;&lt;/del&gt;quot;を&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&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;             //下記のように最強エスケープすればそのまま書けるが、&amp;amp;quot;を&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;にしてデータ量を削減するより安全を取ったほうが良さそうである。&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;             //ちなみに1文字減らすために最強エスケープから&amp;amp;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;amp;&lt;/del&gt;#34;に戻す方法もあるが、&amp;amp;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;amp;&lt;/del&gt;quot;のほうが自動でspan id=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&amp;amp;quot;&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;             //ちなみに1文字減らすために最強エスケープから&amp;amp;#34;に戻す方法もあるが、&amp;amp;quot;のほうが自動でspan id=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&quot;&lt;/ins&gt;の中身から除去されるようなのでそのほうが良さそう。&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;             //plain_text = plain_text.replace(/[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;]/g, (c) =&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;gt; &amp;amp;quot;&lt;/del&gt;m_esc_&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot; &lt;/del&gt;+ c.charCodeAt(0)+&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;_m&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&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;             //plain_text = plain_text.replace(/[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;]/g, (c) =&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt; &quot;&lt;/ins&gt;m_esc_&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot; &lt;/ins&gt;+ c.charCodeAt(0)+&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;_m&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;)&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;           }&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/del&gt;&amp;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;           }&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;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;==== ブロック内改行 ====&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;==== ブロック内改行 ====&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>Turgenev</name></author>
	</entry>
	<entry>
		<id>https://turgenev.cloudfree.jp/mw-new/mw143/index.php?title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki&amp;diff=36&amp;oldid=prev</id>
		<title>Turgenev: Notion-MW</title>
		<link rel="alternate" type="text/html" href="https://turgenev.cloudfree.jp/mw-new/mw143/index.php?title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki&amp;diff=36&amp;oldid=prev"/>
		<updated>2023-11-23T13:43:08Z</updated>

		<summary type="html">&lt;p&gt;Notion-MW&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;2023年11月23日 (木) 22:43時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l21&quot;&gt;21行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;21行目:&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;== データベース部分の設計 ==&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;== データベース部分の設計 ==&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;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;&amp;lt;div class=&quot;res-img&quot;&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[File&lt;/del&gt;:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;5DD93D25-3A2D-4987&lt;/del&gt;-&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;B89C&lt;/del&gt;-&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;AB487E67C355&lt;/del&gt;.jpg&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/del&gt;&amp;lt;/div&amp;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;&amp;lt;div class=&quot;res-img&quot;&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;https&lt;/ins&gt;:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;//turgenev.cloudfree.jp/mw1/imgs/notion&lt;/ins&gt;-&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;mw&lt;/ins&gt;-&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;db&lt;/ins&gt;.jpg&amp;lt;/div&amp;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;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;このような感じで、「使うNotionページへのリンク」「スクリプトによる変換&amp;amp;amp;更新の対象にするかどうか」（←これは今はもう使われていない）「MediaWikiでのID」「MediaWikiでのタイトル」「MediaWikiでのカテゴリー」「サイトの更新日時（＝スクリプトによってMediaWiki側での編集が完了したタイミング）」をデータベースとして保持している。&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;このような感じで、「使うNotionページへのリンク」「スクリプトによる変換&amp;amp;amp;更新の対象にするかどうか」（←これは今はもう使われていない）「MediaWikiでのID」「MediaWikiでのタイトル」「MediaWikiでのカテゴリー」「サイトの更新日時（＝スクリプトによってMediaWiki側での編集が完了したタイミング）」をデータベースとして保持している。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Turgenev</name></author>
	</entry>
	<entry>
		<id>https://turgenev.cloudfree.jp/mw-new/mw143/index.php?title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki&amp;diff=12&amp;oldid=prev</id>
		<title>Turgenev: Notion-MW</title>
		<link rel="alternate" type="text/html" href="https://turgenev.cloudfree.jp/mw-new/mw143/index.php?title=%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%81%95%E3%82%8C%E3%81%9FNotion%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E3%82%88%E3%82%8BMediaWiki&amp;diff=12&amp;oldid=prev"/>
		<updated>2023-11-23T13:05:37Z</updated>

		<summary type="html">&lt;p&gt;Notion-MW&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;「[[Notion|Notion]]のページから下書きを除去した上で[[MediaWiki|MediaWiki]]フォーマットに変換してアップロードする」というこのサイトの動作機構に関して説明する。&lt;br /&gt;
&lt;br /&gt;
== 概要 ==&lt;br /&gt;
&lt;br /&gt;
Notionのページを見出しによって定まる木構造データとみなす。各見出しは無色（デフォルト）である場合と、黄色背景である場合があるとする。この木構造データに対し、「無色の頂点を全て切り落とす」という変換をする。すなわち、自らを包含する見出しが全て黄色であるコンテンツだけを残す。&lt;br /&gt;
&lt;br /&gt;
記事データにこのような変換を施すことで、同じページ内でも場所ごとに公開/非公開を簡便に切り替えられるようにするというのが基本的なアイデアである。&lt;br /&gt;
&lt;br /&gt;
* 例外的に、最初の見出しより前に書いてあるテキストは、必ず出力させる。つまり記事の冒頭に仮想的な「レベル0」の見出しがあると考えればよい。&lt;br /&gt;
* Notionではブロックを選択してショートカットキー「Ctrl+Shift+H」を押すことで直近に適用されたものと同じ色を適用することができるので、複数種類の色を使い分けているのでなければキー一発で公開/非公開を切り替えられる。&lt;br /&gt;
&lt;br /&gt;
さらに、このコンテンツをMediaWikiで公開することで、変更履歴を誰でも見ることができるようになる。これによりどのタイミングでどの箇所が修正されたかというメタコンテンツを「〇月〇日追記」のような形でコンテンツと混在させる必要がなくなる。&lt;br /&gt;
&lt;br /&gt;
また、その他にも頻繁に使われるメタ情報はMediaWikiのテンプレートとして挿入する。例えば、&lt;br /&gt;
&lt;br /&gt;
* ある見出しに属する（公開の）内容が完全に空（ほかの見出しすら含まれない）だった場合は、「作業のため一時的に非公開となっている可能性があります。&amp;amp;#91;履歴&amp;amp;#93;もご確認ください。」と表示するUnderConstruction‏‎テンプレートを挿入する。これにより、既に公開した内容を大幅変更のためなどで一時的に非公開にしたい場合は、該当の見出しの直後に同じレベルの無色の見出し（空でもよい）を挿入すればよいということになる。ただし、あまり使われていない。&lt;br /&gt;
* 内容は存在するものの完成度が低く、今後加筆予定であることを表すStubテンプレート。&lt;br /&gt;
* 執筆時点で古くなっている情報を表すOutdatedテンプレート。&lt;br /&gt;
* 他サイトにあまり書かれておらず貴重と思われる情報を表すValuableテンプレート。&lt;br /&gt;
&lt;br /&gt;
== データベース部分の設計 ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;[[File:5DD93D25-3A2D-4987-B89C-AB487E67C355.jpg]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
このような感じで、「使うNotionページへのリンク」「スクリプトによる変換&amp;amp;amp;更新の対象にするかどうか」（←これは今はもう使われていない）「MediaWikiでのID」「MediaWikiでのタイトル」「MediaWikiでのカテゴリー」「サイトの更新日時（＝スクリプトによってMediaWiki側での編集が完了したタイミング）」をデータベースとして保持している。&lt;br /&gt;
&lt;br /&gt;
ページの新規作成時は「MediaWikiでのID」に&amp;lt;code&amp;gt;&amp;amp;#45;1&amp;lt;/code&amp;gt;を使おうと思ったが、なぜかここが&amp;lt;code&amp;gt;&amp;amp;#45;&amp;lt;/code&amp;gt;と&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;に分かれたrich_textの配列としてデータが返ってくることがあって困ったので&amp;lt;code&amp;gt;&amp;amp;#45;&amp;lt;/code&amp;gt;だけにするように変更した。&lt;br /&gt;
&lt;br /&gt;
Notion側でもページの最終更新日時が取れるので、それをこの表の更新日時と比べて、反映されていない更新があったら適用するという実装にしている。（ただし変換スクリプト自体を変更したときなどは全ページ生成し直す）&lt;br /&gt;
&lt;br /&gt;
== サイトマップの生成 ==&lt;br /&gt;
&lt;br /&gt;
上記でsandboxタグが入っているもの以外が検索サイトにインデックスしてほしいものたちである。そこで、編集完了後に、表の更新日時を使ってxmlサイトマップをスクリプトから生成する。&lt;br /&gt;
&lt;br /&gt;
== 変換コードの概説 ==&lt;br /&gt;
&lt;br /&gt;
大まかな流れは以下の通り。&lt;br /&gt;
&lt;br /&gt;
* 上記データベースの内容をNotion APIから取得する。以下、各行ごとに処理。&lt;br /&gt;
* ページの内容を取得し、黄色い見出しだけ残す変換を行う。Notionのブロックのリストができる&lt;br /&gt;
* notion&amp;amp;#45;to&amp;amp;#45;mdのblocksToMarkdownでマークダウン形式に変換する。&lt;br /&gt;
* いくつか前処理を行う。&lt;br /&gt;
* pandocを用いてMediaWikiに変換する。&lt;br /&gt;
* いくつか後処理（整形）を行う&lt;br /&gt;
* 完成した記事データをMediaWiki APIで投稿する。&lt;br /&gt;
&lt;br /&gt;
その他、ページのリネーム、新規作成時のIDの反映（&amp;lt;code&amp;gt;&amp;amp;#45;&amp;lt;/code&amp;gt;を数字に変える）、既存の記事を新規作成しようとした場合のエラーなど、前後に多少の処理がある。&lt;br /&gt;
&lt;br /&gt;
特筆すべき部分のみ以下で説明する。（おおむね処理の進行順）&lt;br /&gt;
&lt;br /&gt;
=== toggle ===&lt;br /&gt;
&lt;br /&gt;
detail&amp;amp;#45;summaryタグではなくMediaWikiの標準の折りたたみ形式であるmw&amp;amp;#45;collapsibleタグに変更。notion&amp;amp;#45;to&amp;amp;#45;md側を変えるのではなくpandocで変換した後のmediawikiでdetailsタグを置換している。&lt;br /&gt;
&lt;br /&gt;
さらに、summary部分の文字列の先頭に&amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt;が付いていたら折りたたみ状態に変える。これも置換でできる。&lt;br /&gt;
&lt;br /&gt;
* 完全な仕様としては例えばこんな感じ？（未実装）&lt;br /&gt;
** 先頭が&amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt;でない→折りたたまない&lt;br /&gt;
** 先頭が&amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt;&lt;br /&gt;
*** &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt;の次が&amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt;→&amp;lt;code&amp;gt;??&amp;lt;/code&amp;gt;を削除し、折りたたみ&lt;br /&gt;
*** &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt;の次が&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt;→&amp;lt;code&amp;gt;?!&amp;lt;/code&amp;gt;を削除し、折りたたまない&lt;br /&gt;
*** その他→&amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt;だけを削除し、折りたたむ&lt;br /&gt;
&lt;br /&gt;
=== pandocの実行 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;dummy_str_python&amp;quot;&amp;gt;cp.spawn(&amp;amp;quot;pandoc&amp;amp;quot;, [&amp;amp;quot;-f&amp;amp;quot;,&amp;amp;quot;gfm&amp;amp;quot;,&amp;amp;quot;-t&amp;amp;quot;, &amp;amp;quot;mediawiki&amp;amp;quot;, &amp;amp;quot;--shift-heading-level-by=1&amp;amp;quot;]);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;gfm&amp;lt;/code&amp;gt;（Github Flavored Markdown）から&amp;lt;code&amp;gt;mediawiki&amp;lt;/code&amp;gt;に変換する。&amp;lt;code&amp;gt;&amp;amp;#45;&amp;amp;#45;shift&amp;amp;#45;heading&amp;amp;#45;level&amp;amp;#45;by&amp;amp;#61;1&amp;lt;/code&amp;gt;は、[https://www.mediawiki.org/wiki/Help:Formatting/ja Help&amp;amp;#58;書式整形 &amp;amp;#45; MediaWiki]にもある通り、MediaWikiの記事内ではレベル1の見出しは非推奨だからである。&lt;br /&gt;
&lt;br /&gt;
=== 画像 ===&lt;br /&gt;
&lt;br /&gt;
キャプションが未対応（[https://github.com/souvikinator/notion-to-md/issues/63 https://github.com/souvikinator/notion-to-md/issues/63]）なので←に従ってsetCustomTransformerをする。&lt;br /&gt;
&lt;br /&gt;
[https://zenn.dev/st43/articles/8e2f9c48761e59 Notion API（v0.4.4）で画像を扱う]のようにNotionの内部画像の扱いは面倒なので当サイトではすべて外部ストレージ（もっと言えばMediaWiki内部）にアップロードしている。書式も適宜変換する。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;カテゴリ情報seo情報&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== カテゴリ情報、seo情報 ===&lt;br /&gt;
&lt;br /&gt;
データベースにあるタイトルとかtagsデータから生成する。seoについては[[MediaWiki|MediaWiki]] も参照。&lt;br /&gt;
&lt;br /&gt;
=== 各種の整形処理 ===&lt;br /&gt;
&lt;br /&gt;
一部コンテンツはnotion&amp;amp;#45;to&amp;amp;#45;mdで生成されるマークダウンそのままだと不都合があるので、専用のコードを入れて変換している。場合によってはnotion&amp;amp;#45;to&amp;amp;#45;md本体側にも変更を入れている（一旦特殊なエスケープシーケンスに変換しておいてpandocに触られるのを回避し、MediaWikiが返ってきてから自前で編集するようにしている箇所もある）。&lt;br /&gt;
&lt;br /&gt;
具体的には以下の通り。&lt;br /&gt;
&lt;br /&gt;
* 特殊文字の処理&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;amp;#42;&amp;lt;/code&amp;gt;などがマークダウンにおける特殊文字と解釈されてしまうのを防ぐためエスケープ。また、&amp;lt;code&amp;gt;&amp;amp;#123;&amp;amp;#125;&amp;lt;/code&amp;gt;や&amp;lt;code&amp;gt;&amp;amp;#126;&amp;lt;/code&amp;gt;などはMediaWiki上の特殊文字であり、これもやはりエスケープする。&lt;br /&gt;
* ページ間リンク&lt;br /&gt;
** Notionでのページ間リンクをMediaWikiでのページ間リンクに変換するため、先ほどのデータベース表に従って&amp;lt;code&amp;gt;&amp;amp;#91;ページタイトル&amp;amp;#93;(/ページタイトル)&amp;lt;/code&amp;gt;という形式に変換する（するとpandocが自動で&amp;lt;code&amp;gt;&amp;amp;#91;&amp;amp;#91;ページタイトル|ページタイトル&amp;amp;#93;&amp;amp;#93;&amp;lt;/code&amp;gt;に変換してくれる）&lt;br /&gt;
&lt;br /&gt;
=== テンプレート挿入 ===&lt;br /&gt;
&lt;br /&gt;
「!s」だけの行があったら&amp;amp;#123;&amp;amp;#123;Stub&amp;amp;#125;&amp;amp;#125;テンプレートに変換する、というような実装にしている。&lt;br /&gt;
&lt;br /&gt;
== オリジナルのnotion&amp;amp;#45;to&amp;amp;#45;mdへの変更 ==&lt;br /&gt;
&lt;br /&gt;
上記のような良い感じのMediaWikiに変換する目的と、単純にできたばかりでバグが多いため、色々変えている。&lt;br /&gt;
&lt;br /&gt;
=== 数式関連 ===&lt;br /&gt;
&lt;br /&gt;
以前は変えていたが[https://github.com/souvikinator/notion-to-md/commit/fdd96ca0362663c914cd5fde62baef520dae6763 https://github.com/souvikinator/notion-to-md/commit/fdd96ca0362663c914cd5fde62baef520dae6763]で改善されたため不要&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;mdts内&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== &amp;lt;code&amp;gt;md.ts&amp;lt;/code&amp;gt;内 ===&lt;br /&gt;
&lt;br /&gt;
==== 書式 ====&lt;br /&gt;
&lt;br /&gt;
太字、斜体、取り消し線、コード（&amp;lt;code&amp;gt;`&amp;lt;/code&amp;gt;）をそれぞれhtmlタグのstrong, em, s, codeに変更。&amp;lt;code&amp;gt;```&amp;lt;/code&amp;gt;は変えていない（markdownにおける&amp;amp;lt;pre&amp;amp;gt;の動作が怪しかったため）。&lt;br /&gt;
&lt;br /&gt;
==== ハイパーリンク ====&lt;br /&gt;
&lt;br /&gt;
pandocでの変換においてハイパーリンクの後にスペースなどを開けずに文字が続くとバグることがあるので、他で使わない固定文字列のセパレータを挿入し、変換後に消す。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;codeblock&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== codeBlock ====&lt;br /&gt;
&lt;br /&gt;
コードにおいて、言語がpythonなどの良く知られたものに設定されていると、pandocによって&amp;lt;strong&amp;gt;syntaxhighlight&amp;lt;/strong&amp;gt;タグに変えられてしまう。今回はSyntaxHightlight拡張機能が無効のMediaWikiを使っているので、言語にダミー文字列を付加する（付加ではなくダミー文字列だけにしても変わらないが、情報を落とすのは勿体ない気がしたので）。またpandoc側の問題で&amp;lt;code&amp;gt;visual basic&amp;lt;/code&amp;gt;のように言語名にスペースが入っていると&amp;lt;code&amp;gt;visual&amp;lt;/code&amp;gt;だけになってしまうようなので、スペースをアンダースコアに置換。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;dummy_str_python&amp;quot;&amp;gt;language = &amp;amp;quot;dummy_str_&amp;amp;quot;+language?.replace(&amp;amp;quot; &amp;amp;quot;, &amp;amp;quot;_&amp;amp;quot;);//for MediaWiki without SyntaxHightlight extension&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;span id=&amp;quot;notion&amp;amp;#45;to&amp;amp;#45;mdts内&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== &amp;lt;code&amp;gt;notion&amp;amp;#45;to&amp;amp;#45;md.ts&amp;lt;/code&amp;gt;内 ===&lt;br /&gt;
&lt;br /&gt;
==== 特殊文字エスケープ ====&lt;br /&gt;
&lt;br /&gt;
大きく分けて、notion&amp;amp;#45;to&amp;amp;#45;mdの欠点を補うための弱いエスケープ（&amp;lt;code&amp;gt;\&amp;lt;/code&amp;gt;の付加）と、pandocでの変換を回避するための強いエスケープ（数値に変換して他で使わないセパレータで囲う）がある。&lt;br /&gt;
&lt;br /&gt;
解説が面倒なのでコードだけとりあえず。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;dummy_str_javascript&amp;quot;&amp;gt;//`のみcodeに変え、```は```のままという仕様の場合&lt;br /&gt;
          if (content.type === &amp;amp;quot;text&amp;amp;quot;){&lt;br /&gt;
            if (type == &amp;amp;quot;code&amp;amp;quot;){&lt;br /&gt;
              //```の内部では&amp;amp;lt;&amp;amp;gt;は無効なので本来は不要だが、detailsまわりが修正されるまで、&amp;amp;lt;&amp;amp;gt;を最強エスケープの対象としておく。&lt;br /&gt;
              //無事修正されたので、対象外に&lt;br /&gt;
              //plain_text =  plain_text.replace(/[&amp;amp;lt;&amp;amp;gt;]/g, (c) =&amp;amp;gt;&amp;amp;quot;m_esc_&amp;amp;quot; + c.charCodeAt(0)+&amp;amp;quot;_m&amp;amp;quot;)&lt;br /&gt;
              //バッククォートはmarkdownの```の中でも有害になる珍しい文字であるが、外側と対処法が異なる。&lt;br /&gt;
              //markdownでコード内に`を書くには、両側をそれより多い`で囲うしかなく（\`や&amp;amp;amp;#96;ではそれがそのまま表示されてしまう）、その実装が面倒である。&lt;br /&gt;
              //そこで、最強エスケープをかけて、MediaWikiに変換してから元に戻す。ちなみにMediaWikiでは`は特殊文字ではないのでエスケープ文字ではなくベタ書きに戻す。&lt;br /&gt;
              plain_text =  plain_text.replace(/`/g, (c) =&amp;amp;gt; &amp;amp;quot;m_esc_&amp;amp;quot; + c.charCodeAt(0)+&amp;amp;quot;_m&amp;amp;quot;)&lt;br /&gt;
              &lt;br /&gt;
            }else{//テキストエリア&lt;br /&gt;
              //以下は、MediaWikiの特殊文字であるにもかかわらずpandocがそのままべた書きしてしまう文字。最強エスケープが必要。&lt;br /&gt;
              //これらはMarkdownの```およびMediaWikiのpreの内側では無害である。（外側では特殊文字であるものとそうでないものがある。）&lt;br /&gt;
              plain_text = plain_text.replace(/[=;:#*&amp;#039;{}~\-\[\]]/g, (c) =&amp;amp;gt; &amp;amp;quot;m_esc_&amp;amp;quot; + c.charCodeAt(0)+&amp;amp;quot;_m&amp;amp;quot;)&lt;br /&gt;
              &lt;br /&gt;
              //これらは、Markdownのテキストエリアでは特殊文字だが、MediaWikiの特殊文字ではないあるいはpandocがちゃんと扱えるもの。&lt;br /&gt;
              //（ただし、&amp;amp;quot;.&amp;amp;quot;（ピリオド）のみ、「リンクテキストもURLになっているリンク及びcode内に書かれた（リンクでない）URLがpandocの変換でおかしくなるのを防ぐ」という目的で入れている。）&lt;br /&gt;
              //この変換は先ほどの最強エスケープより後でなければいけない。（#が最強エスケープされるのを防ぐため）（もちろん同時でもいい）&lt;br /&gt;
              //スラッシュでのエスケープだと`&amp;amp;lt;`でバグったことがあった（おそらくpandocのせい）ので、&amp;amp;amp;#xx;を使用&lt;br /&gt;
              plain_text = plain_text.replace(/[`$+&amp;amp;amp;&amp;amp;lt;&amp;amp;gt;\\.]/g, (c) =&amp;amp;gt; &amp;amp;quot;&amp;amp;amp;#&amp;amp;quot; + c.charCodeAt(0)+&amp;amp;quot;;&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
              //2つ以上の連続する空白文字は（そのように表示したい特別な理由があると考えて）&amp;amp;amp;nbsp;に変換。これは&amp;amp;amp;のエスケープより後である必要がある。&lt;br /&gt;
              plain_text = plain_text.replace(/ {2,}/g, (c) =&amp;amp;gt; c.split(&amp;#039;&amp;#039;).map(function() { return &amp;#039;&amp;amp;amp;nbsp;&amp;#039;; }).join(&amp;#039;&amp;#039;))&lt;br /&gt;
&lt;br /&gt;
              //notion-to-mdがブロック内改行に対応していないので対応。nbspへの変換より後に行う。&lt;br /&gt;
              plain_text = plain_text.replace(/\n/g, &amp;amp;quot;  \n&amp;amp;quot;)&lt;br /&gt;
            }&lt;br /&gt;
            //また、&amp;amp;quot;も、mediawikiでの特殊文字ではないが、pandocでは&amp;amp;amp;quot;に変換される。&lt;br /&gt;
            //ベタ書きでも表示には影響ないが、span id=&amp;amp;quot;&amp;amp;quot;の中身に生のダブルクォーテーションが入ってしまう副作用があるし、その他問題が起きる可能性がある。&lt;br /&gt;
            //下記のように最強エスケープすればそのまま書けるが、&amp;amp;amp;quot;を&amp;amp;quot;にしてデータ量を削減するより安全を取ったほうが良さそうである。&lt;br /&gt;
            //ちなみに1文字減らすために最強エスケープから&amp;amp;amp;#34;に戻す方法もあるが、&amp;amp;amp;quot;のほうが自動でspan id=&amp;amp;quot;&amp;amp;quot;の中身から除去されるようなのでそのほうが良さそう。&lt;br /&gt;
            //plain_text = plain_text.replace(/[&amp;amp;quot;]/g, (c) =&amp;amp;gt; &amp;amp;quot;m_esc_&amp;amp;quot; + c.charCodeAt(0)+&amp;amp;quot;_m&amp;amp;quot;)&lt;br /&gt;
          }&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== ブロック内改行 ====&lt;br /&gt;
&lt;br /&gt;
NotionではShift+Enterによりブロック内での改行が可能であるが、notion&amp;amp;#45;to&amp;amp;#45;mdはこれに対応していないので、Markdownの文法に従って行末に半角スペースを2つ追加する。&lt;br /&gt;
&lt;br /&gt;
また、改行を連続して2つ入れると（末尾に空白2つがあっても）Markdownの改段落扱いになり、意図した表示にならないため、避ける。&lt;br /&gt;
&lt;br /&gt;
==== コードブロックへのキャプション ====&lt;br /&gt;
&lt;br /&gt;
notion&amp;amp;#45;to&amp;amp;#45;mdでは未対応である。とりあえず独自でつけている。&lt;br /&gt;
&lt;br /&gt;
==== ページ間リンク ====&lt;br /&gt;
&lt;br /&gt;
ページ間のメンションであれば、MediaWiki上での記事リンクにする（前述）。そのためのマーカーを付加しておく。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;取り消し線下線の部分の除去&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== 取り消し線&amp;amp;amp;下線の部分の除去 ====&lt;br /&gt;
&lt;br /&gt;
取り消し線と下線が両方指定されているテキストは除去する。これは見出しごとではなく特定の文言だけ非公開にしたい場合のための措置だが、怖いのであまり使っていない。&lt;br /&gt;
[[Category:IT]]{{#seo:|title={{FULLPAGENAME}} - Turgenev&amp;#039;s Wiki}}&lt;/div&gt;</summary>
		<author><name>Turgenev</name></author>
	</entry>
</feed>