-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add plugin to skip command linker #153
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really love the solution of adding a remark plugin with new syntax to override the auto-linker instead of constraining what the auto-linker operates on, but if @iterative/docs feels differently I won't stand in the way. If nothing else, it could be a decent mid-ground and it won't be very difficult to backport empty links after adjusting autolinker behavior.
We have a constraint on linking when there is inline code with Also, we already use links to override the autogenerated links. So, passing an empty value to ignore auto-link seemed a good approach to me. |
As far as I understand, the originally suggested constraint when this was proposed is
It seems to me like auto-linking only code blocks with a single flag would be the most expected, unless there is a good reason to auto-link commands with more than one flag instead of manually linking those cases (@iterative/docs may be able to think of an example). Using This feature makes sense, at least in the current context, but even then saying that all multi-flag code examples should use it feels a bit too intrusive. |
I could only find a similar case scenario in dvc.org
If we want to fully ignore the command line linker in a similar case scenario then feel free to open a ticket and continue with the discussion. cc: @iterative/docs |
This comment was marked as resolved.
This comment was marked as resolved.
OK, I guess it's a separate Q from #156 (that one is more about whether the subcommands and flags actually exist). BTW, should we move it to this repo? To answer the Q, I think a decent default behavior would be to link to the specific option only when there's a single flag indeed, but still link to the general ref. page if there are more (due to ambiguity). Other options:
|
Sure, we can move it here as core logic is here.
Yes, I agree with this and it works as mentioned except for multiple options. Right now, it links to the first option from the multiple options and ignores anything more. But, as mentioned such usage is rare for us. |
By default, our command line linkers always link any inline code based on
dvc
,cml
, ... our tools.If we want to customize them we can always wrap the inline code with a link eg:
This PR adds a plugin to allow us to have no link at all. For that, we can pass no value. eg:
closes iterative/cml.dev#424