Repository navigation
fix: divをまたぐspanが[[/div]]を飲み込みdivが閉じない問題を修正 - #80
Merged
r74tech merged 8 commits intoOct 12, 2026
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
wdpr-demo-v1-files | 55259bc | Commit Preview URL Branch Preview URL |
Oct 12 2026, 03:45 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
decompiler-preview | 55259bc | Commit Preview URL Branch Preview URL |
Oct 12 2026, 03:45 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
wdpr-demo-v1 | 55259bc | Commit Preview URL Branch Preview URL |
Oct 12 2026, 03:45 PM |
Wikidotはspanの組をdivより先に決め、出力をHTML Tidyで修復するため、 spanはdivの境界で閉じて同じ属性で開き直される。パース前にトークン列を 同じ形に書き換え、[[/div]]がspanの中身にならないようにした。 Fixes #78
r74tech
force-pushed
the
fix/78-span-across-block-close
branch
from
October 12, 2026 16:10
55259bc to
34163dc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
divの中で開いた
[[span]]の閉じタグがdivの外にあると、間の[[/div]]をspanの本文として取り込み、対応する[[div]]が閉じていないと誤って警告される問題を修正する。#79の上に積んでいる。Fixes #78
spanとdivの境界
Wikidotは
[[span]]と[[/span]]の組を[[div]]より先に決め、出力をHTML Tidyで修復する(Text_Wikiのルール順はSpanがDivより前、WikiTransformation::purifyHtmlでtidy_parse_stringを通す)。そのためspanはdivの境界で閉じ、境界の後ろで同じ属性のまま開き直される。edit/PagePreviewModuleでも同じ出力になることを確認した。[[code]]、[[math]]、@@...@@、コメント、脚注、行頭の[[html]]ブロックの中身は読み飛ばすspan_は対象外。実機ではspan_がdivをまたぐとdiv自体が成立せず、別の挙動になるidを含めて複製するtests/fixtures/span/div-boundary/に追加footnoteのスタック溢れ
閉じない
[[footnote]]を大量に並べる、または閉じたfootnoteを数千段入れ子にすると、parseがRangeError: Maximum call stack size exceededで落ちていた。footnoteの本文を入れ子1段ごとに再帰的に解析しているため。[[footnote]]は文字列として扱う。上限は式の入れ子(MAX_EXPR_NESTING)に合わせた未修正:
<p>で包む、span内のリストや[[code]]が文字列になる、入れ子のspanが両方divをまたぐときの開き直し)は扱っていない