GithubHelp home page GithubHelp logo

Transform Links about readme-sync HOT 2 OPEN

daxpedda avatar daxpedda commented on September 28, 2024
Transform Links

from readme-sync.

Comments (2)

zheland avatar zheland commented on September 28, 2024

Thank you for report.
I fixed the absolute path check function, so now the error will occur.
However, at the moment intra-doc links (like crate::Test) are not natively supported in pulldown-cmark, that is probably logical.
I added a function with which you can map links (see example in README.md) so you can now use intra-doc links with them separately specified in the readme sync test.

from readme-sync.

daxpedda avatar daxpedda commented on September 28, 2024

Things like std::clone::Clone aren't working either, thinking about it I can't figure out how they would have been supported anyway. std::clone::Clone has to be somehow converted to https://doc.rust-lang.org/core/clone/trait.Clone.html, I can't do that with map_links either, unless I do it manually for each intra-doc link.

So currently my solution will be to manually map_links all intra-doc links, but the next issue I encountered is this:

README.md:

[`Clone`](https://doc.rust-lang.org/core/clone/trait.Clone.html) text.

lib.rs:

//! [`Clone`] text.

I expected this to match, but it doesn't. My current workaround is:
README.md:

[`Clone`] text.

[`Clone`]: https://doc.rust-lang.org/core/clone/trait.Clone.html

lib.rs:

//! [`Clone`] text.
//!
//! [`Clone`]: Clone

I guess whats necessary is a function that removes all links, including link sections ([`Clone`]: Clone, I don't actually know the right terms) so it can match resolved links instead of where the link is specified.

from readme-sync.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.