Comments (10)
Oh nice, if TOML is usable I'll juste use the toml
crate and it will be easier (and more solid) than parsing a wonky format.
from cargo-intraconv.
❯ cg intraconv -i intraconv.toml tracing-core
/Users/alexis/Projects/rust/tracing/tracing-core/src/collect.rs
===============================================================
443: " /// [`downcast_ref`]: #method.downcast_ref"
" /// [`downcast_ref`]: Collect::downcast_ref()"
/Users/alexis/Projects/rust/tracing/tracing-core/src/event.rs
=============================================================
20: "/// [span]: ../span"
"/// [span]: super::span"
21: "/// [fields]: ../field"
"/// [fields]: super::field"
/Users/alexis/Projects/rust/tracing/tracing-core/src/lib.rs
===========================================================
93: "//! [`libstd`]: https://doc.rust-lang.org/std/index.html"
"//! [`libstd`]: crate"
107: "//! [`liballoc`]: https://doc.rust-lang.org/alloc/index.html"
"//! [`liballoc`]: alloc"
~/P/r/tracing on master via v1.47.0
❯ cg intraconv tracing-core
+/Users/alexis/Projects/rust/tracing/tracing-core/src/collect.rs
+===============================================================
+
+ 443: " /// [`downcast_ref`]: #method.downcast_ref"
+ " /// [`downcast_ref`]: Collect::downcast_ref()"
+
/Users/alexis/Projects/rust/tracing/tracing-core/src/event.rs
=============================================================
20: "/// [span]: ../span"
"/// [span]: super::span"
21: "/// [fields]: ../field"
"/// [fields]: super::field"
/Users/alexis/Projects/rust/tracing/tracing-core/src/lib.rs
===========================================================
93: "//! [`libstd`]: https://doc.rust-lang.org/std/index.html"
"//! [`libstd`]: crate"
107: "//! [`liballoc`]: https://doc.rust-lang.org/alloc/index.html"
"//! [`liballoc`]: alloc"
With and without the ignore file. I just have to document it properly in the README and I'll push the changes.
from cargo-intraconv.
This may become verbose quickly if this is a command line option.
I'm not sure how to do it properly, maybe through a file and a --ignore-links [FILE]
from cargo-intraconv.
Yeah, a file sounds nice - I was imagining this as configurable per-file and per-link so it would definitely be annoying to type by hand.
from cargo-intraconv.
What would you want from such a file ? I have no idea about the format I'll use
Edit: What features are you thinking about ?
from cargo-intraconv.
I was imagining something like this:
[ignore]
[["tracing/src/lib.rs"]]
"`downcast_ref`" = "#method.downcast_ref"
(I checked and that's valid toml.)
from cargo-intraconv.
I'm wondering, would it be more intuitive to use suffixes (mod.rs
can match multiple times) or canonicalised paths (mod.rs
has been expanded to exactly one file) for the configuration file and the behaviour of intraconv
? What would you expect ?
from cargo-intraconv.
Maybe it should use .gitignore
syntax? Where you can say /tracing/src/mod.rs to mean an absolute path and mod.rs to mean a relative one, possibly matching many files.
from cargo-intraconv.
Nice idea, I'll go with that !
from cargo-intraconv.
93: "//! [`libstd`]: https://doc.rust-lang.org/std/index.html"
"//! [`libstd`]: crate"
Another instance of #32 😓
from cargo-intraconv.
Related Issues (20)
- Run on all crates in the workspace HOT 3
- Don't remove links that are the same except for a disambiguator HOT 1
- Replace `docs.rs/crate` with `crate`
- Some links are not caught HOT 5
- Convert doc.rust-lang.org to intra-doc links HOT 5
- Redundant links are not removed if they were originally HTTP links HOT 1
- [stretch] convert <a href=""> to intra-doc links HOT 3
- -a removes all whitespace
- docs.rs/crate/x is treated as if crate/ is a crate HOT 6
- Properly detect blocks HOT 1
- Wrongly detect short form of a crate for docs.rs
- If a favored url is converted to the current crate, use `crate::` instead HOT 4
- Take backticks into account when removing links that are the same HOT 3
- `index.html` should link to `self`, not the current page
- Intraconv shouldn't convert links to primitives HOT 1
- Read `intraconv.toml` by default
- Ignore file compares the whole line, not the link HOT 4
- Strip backticks before comparing to ignore file
- Ignore links per-crate? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo-intraconv.