rkd77 / elinks

Fork of elinks
Other
349 stars 38 forks source link

Elinks cannot find fragment link to <section> element #207

Closed PhilipRoman closed 1 year ago

PhilipRoman commented 1 year ago

Tested on both 0.15.1 and master (123a053b)

Here is a reduced example which reproduces the issue (original html output is from javadoc):

navigate to the first link (or open the file with #representingClass() appended to URL)

Doesn't work:

<section class="class-description" id="class-description">
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>T</code> - the Java type that represents values which can be in this set. Can be obtained at runtime using <a href="#representingClass()"><code>representingClass()</code></a></dd>
</dl>
<dl class="notes">
<dt>All Known Subinterfaces:</dt>
<dd><code><a href="ValueInfo.Int64Info.html" title="interface in ssa3">ValueInfo.Int64Info</a></code>, <code><a href="ValueInfo.StringInfo.html" title="interface in ssa3">ValueInfo.StringInfo</a></code>, <code><a href="ValueInfo.TupleInfo.html" title="interface in ssa3">ValueInfo.TupleInfo</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">ValueInfo&lt;T&gt;</span></div>
<div class="block">Represents an abstract set of values.
 There are specializations for important types like integers, etc. which have important properties of their own.</div>
</section>

<section class="detail" id="representingClass()">
<h3>representingClass</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;? extends <a href="ValueInfo.html" title="type parameter in ValueInfo">T</a>&gt;</span>&nbsp;<span class="element-name">representingClass</span>()</div>
</section>

<section class="detail" id="exactValue()">
<h3>exactValue</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Optional.html" title="class or interface in java.util" class="external-link">Optional</a>&lt;? extends <a href="ValueInfo.html" title="type parameter in ValueInfo">T</a>&gt;</span>&nbsp;<span class="element-name">exactValue</span>()</div>
</section>

<section class="detail" id="satisfiable()">
<h3>satisfiable</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">satisfiable</span>()</div>
</section>

<section class="detail" id="canAlias(ssa3.ValueInfo)">
<h3>canAlias</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">canAlias</span><wbr><span class="parameters">(<a href="ValueInfo.html" title="interface in ssa3">ValueInfo</a>&lt;<a href="ValueInfo.html" title="type parameter in ValueInfo">T</a>&gt;&nbsp;other)</span></div>
</section>

<section class="detail" id="alwaysAliases(ssa3.ValueInfo)">
<h3>alwaysAliases</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">alwaysAliases</span><wbr><span class="parameters">(<a href="ValueInfo.html" title="interface in ssa3">ValueInfo</a>&lt;<a href="ValueInfo.html" title="type parameter in ValueInfo">T</a>&gt;&nbsp;other)</span></div>
</section>

Works fine: (same file but section elements are replaced with div)

<section class="class-description" id="class-description">
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>T</code> - the Java type that represents values which can be in this set. Can be obtained at runtime using <a href="#representingClass()"><code>representingClass()</code></a></dd>
</dl>
<dl class="notes">
<dt>All Known Subinterfaces:</dt>
<dd><code><a href="ValueInfo.Int64Info.html" title="interface in ssa3">ValueInfo.Int64Info</a></code>, <code><a href="ValueInfo.StringInfo.html" title="interface in ssa3">ValueInfo.StringInfo</a></code>, <code><a href="ValueInfo.TupleInfo.html" title="interface in ssa3">ValueInfo.TupleInfo</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">ValueInfo&lt;T&gt;</span></div>
<div class="block">Represents an abstract set of values.
 There are specializations for important types like integers, etc. which have important properties of their own.</div>
</section>

<div class="detail" id="representingClass()">
<h3>representingClass</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;? extends <a href="ValueInfo.html" title="type parameter in ValueInfo">T</a>&gt;</span>&nbsp;<span class="element-name">representingClass</span>()</div>
</div>

<div class="detail" id="exactValue()">
<h3>exactValue</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Optional.html" title="class or interface in java.util" class="external-link">Optional</a>&lt;? extends <a href="ValueInfo.html" title="type parameter in ValueInfo">T</a>&gt;</span>&nbsp;<span class="element-name">exactValue</span>()</div>
</div>

<div class="detail" id="satisfiable()">
<h3>satisfiable</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">satisfiable</span>()</div>
</div>

<div class="detail" id="canAlias(ssa3.ValueInfo)">
<h3>canAlias</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">canAlias</span><wbr><span class="parameters">(<a href="ValueInfo.html" title="interface in ssa3">ValueInfo</a>&lt;<a href="ValueInfo.html" title="type parameter in ValueInfo">T</a>&gt;&nbsp;other)</span></div>
</div>

<div class="detail" id="alwaysAliases(ssa3.ValueInfo)">
<h3>alwaysAliases</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">alwaysAliases</span><wbr><span class="parameters">(<a href="ValueInfo.html" title="interface in ssa3">ValueInfo</a>&lt;<a href="ValueInfo.html" title="type parameter in ValueInfo">T</a>&gt;&nbsp;other)</span></div>
</div>
rkd77 commented 1 year ago

Thanks, added the "section" to the list of known tags to ELinks.

PhilipRoman commented 1 year ago

Thanks for the quick response! Works great!