Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.3.5: 特定のHTMLタグ(の組み合わせ)でエラーが報告されない #52

Open
momdo opened this issue Jul 14, 2016 · 1 comment
Labels
Type: Bug Bug or Bug fixes

Comments

@momdo
Copy link

momdo commented Jul 14, 2016

textlint-plugin-htmlとの併用です(ほかのルールチェックでもエラーが無視される場合があるようですが、きちんと確認できてません)。

テストケース1

<!-- すべてNG -->
<head>
<title>テスト"</title>
</head>
<body>

<h1>テスト"</h1>
<h6>テスト"</h6>

<ul>
<li>テスト"
</ul>

<ol>
<li>テスト"
</ol>

<dl>
<dt>テスト"
<dd>テスト"
</dl>

<table>
<tr><th>テスト"</th></tr>
<tr><td>テスト"</td></tr>
</table>

<pre>
テスト"
</pre>

<figure>
<img src="test.gif" alt="">
<figcaption>テスト"</figcaption>
</figure>

<div>
テスト"
</div>

各種要素内のエラーが検知できません。

テストケース2

<p>テスト"<!-- OK -->
<p>テスト"<!-- OK -->
<p>テスト"<!-- NG -->
<ul>
<li>テスト"</li><!-- NG -->
</ul>
<p>テスト"</p><!-- OK -->
<ul>
<li>テスト"</li><!-- NG -->
</ul>

p要素(終了タグ省略)+ul要素という組み合わせだと、なぜかp要素内のエラーが報告されません。

@azu
Copy link
Member

azu commented Jul 14, 2016

https://github.com/textlint/textlint-plugin-html のパース+AST作成の問題な可能性もあります。
(ただ閉じカッコの省略はパーサーに厳しいので、 https://github.com/wooorm/rehype が対応してなかったら多分できないです)
textlint-plugin-html使ってるユーザーの絶対数が少ないので、こういう問題はありえると思います。

@azu azu added the Type: Bug Bug or Bug fixes label Mar 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug or Bug fixes
Projects
None yet
Development

No branches or pull requests

2 participants