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

Error parsing reStructuredText hyperlink split into two lines #10279

Closed
cmorve-te opened this issue Oct 9, 2024 · 2 comments
Closed

Error parsing reStructuredText hyperlink split into two lines #10279

cmorve-te opened this issue Oct 9, 2024 · 2 comments
Labels

Comments

@cmorve-te
Copy link

cmorve-te commented Oct 9, 2024

The result of parsing https://github.com/llvm/llvm-project/blob/665457815f11118f7e755a471f33606c8562a4be/clang-tools-extra/docs/clang-tidy/checks/abseil/no-namespace.rst?plain=1#L20

i.e.

See `the full Abseil compatibility guidelines <https://
abseil.io/about/compatibility>`_ for more information.

with pandoc 3.5 (and 3.1.3) is

bash-5.2# /pandoc-3.5/bin/pandoc /llvm-project/clang-tools-extra/docs/clang-tidy/checks/abseil/no-namespace.rst -f rst -t html5
[WARNING] Reference not found for 'the full abseil compatibility guidelines <https:// abseil.io/about/compatibility>' at /llvm-project/clang-tools-extra/docs/clang-tidy/checks/abseil/no-namespace.rst line 21 column 33
<div class="title">
<p>clang-tidy - abseil-no-namespace</p>
</div>
<h1 id="abseil-no-namespace">abseil-no-namespace</h1>
<p>Ensures code does not open <code>namespace absl</code> as that
violates Abseil's compatibility guidelines. Code should not open
<code>namespace absl</code> as that conflicts with Abseil's
compatibility guidelines and may result in breakage.</p>
<p>Any code that uses:</p>
<div class="sourceCode" id="cb1"><pre
class="sourceCode c++"><code class="sourceCode cpp"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="kw">namespace</span> absl <span class="op">{</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> <span class="op">...</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<p>will be prompted with a warning.</p>
<p>See <a href="">the full Abseil compatibility guidelines &lt;https://
abseil.io/about/compatibility&gt;</a> for more information.</p>

i.e.

<p>See <a href="">the full Abseil compatibility guidelines &lt;https://
abseil.io/about/compatibility&gt;</a> for more information.</p>

From a quick look at the docs, and without being familiar with reStructuredText, I can't say for sure whether this is a bug in pandoc or in no-namespace.rst.

@cmorve-te cmorve-te added the bug label Oct 9, 2024
@jgm
Copy link
Owner

jgm commented Oct 9, 2024

I can't say for sure whether this is a bug in pandoc or in no-namespace.rst.

Use rst2html no-namespace.rst to determine how docutils converts it.

@jgm
Copy link
Owner

jgm commented Oct 9, 2024

Answer: it appears to work in RST, so it's an issue in pandoc.

@jgm jgm closed this as completed in c5bab88 Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants