Skip to content

Conversation

@gmilde
Copy link
Contributor

@gmilde gmilde commented Oct 1, 2025

Next set of fixes for #1680

gmilde added 2 commits October 1, 2025 15:16
Currently, internal links to sections fail for the rST converter.
Add test cases for what needs to be fixed.

The expected results were determined/tested with a test document in a wiki instance.
The "refid" attribute works fine with explicit targets.
IDs of section headings are generated by Moin using a different normalization
function. Find the matching section element and create a refid "a la Moin".
@gmilde
Copy link
Contributor Author

gmilde commented Oct 2, 2025

Links fixed by this PR:

.. _section:1:

Internal Links
--------------
Implicit targets
''''''''''''''''
Section titles become implicit targets. Referencing them ignores
case: `explicit targets`_ as well as `Explicit targets`_.

An `anonymous reference, redirected to the first section`__.

__ `Internal Links`_

A reference to the Greek τίτλος_.

A link to the section with `two
spaces`_.

τίτλος
^^^^^^
Non-ASCII section title (using the Greek alphabet).

Two  spaces
^^^^^^^^^^^
The title of this section has two spaces in the rST source.

Explicit targets
''''''''''''''''
First_, a reference to the `first paragraph`_.
 
A link to the explicit target representing section:1_.

Still missing (requires change to the handling of <target> elements):

Paragraph with _`inline target`.

.. note::
   :name: my note

   Admonitions can be targets if they use the :name: option.

.. image:: help-common/logo.svg
   :alt: the MoinMoin logo
   :name: moin logo

Links to the `inline target`_ and `my note`_ and the `moin logo`_.

@UlrichB22 UlrichB22 merged commit 464244c into moinwiki:master Oct 4, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants