Skip to content

Impossible to put same link in body and see also with different title #480

Open
swiftlang/swift-docc-render
#691
@a-docc-user

Description

@a-docc-user

Description

Markdown

For more information see the [specification](https://example.com).

## See Also
- [Full Name of the Specification](https://example.com)

Checklist

  • If possible, I've reproduced the issue using the main branch of this package.
    This issue hasn't been addressed in an existing GitHub issue.

Expected Behavior

Expected Result

For more information see the specification.

See Also

Actual behavior

Actual Result

For more information see the specification.

See Also

Steps To Reproduce

  1. Put following documentation:
For more information see the [specification](https://example.com).

## See Also
- [Full Name of the Specification](https://example.com)

Swift-DocC Version Information

Latest Xcode and also master

Swift Compiler Version Information

swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
Target: arm64-apple-macosx13.0

Activity

franklinsch

franklinsch commented on Feb 15, 2023

@franklinsch
Contributor

@Kyle-Ye would this be resolved as part of #376?

Kyle-Ye

Kyle-Ye commented on Feb 15, 2023

@Kyle-Ye
Contributor

Yes, I think this is a duplicate issue of #271.

Kyle-Ye

Kyle-Ye commented on Mar 12, 2023

@Kyle-Ye
Contributor

Yes, I think this is a duplicate issue of #271.

[Update] After carefully reviewing it again, I found that it is a different issue. The current PR does not solve it.

The reason for this is that current seeAlsoSections implementation only store identifiers of link and then retrieve the title from the references using identifier matching.

"seeAlsoSections": [
    {
        "title": "Related Documentation",
        "identifiers": ["https://example.com", "https://example3.com"]
    }
]

To solve the problem, maybe we should update the seeAlsoSections implementation to store a overrideTitle here to support this feature.

added
enhancementImprovements or enhancements to existing functionality
and removed
duplicateThis issue or pull request already exists
on Mar 12, 2023
linked a pull request that will close this issue on Mar 12, 2023
Kyle-Ye

Kyle-Ye commented on Mar 12, 2023

@Kyle-Ye
Contributor

I just finish a draft implementation on this, any suggestion on this? @franklinsch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementImprovements or enhancements to existing functionalitygood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @d-ronnqvist@franklinsch@Kyle-Ye@a-docc-user

      Issue actions

        Impossible to put same link in body and see also with different title · Issue #480 · swiftlang/swift-docc