-
Notifications
You must be signed in to change notification settings - Fork 0
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 links to source code #46
Conversation
var from = new Uri(_output); | ||
var to = new Uri(member.Location.Path); | ||
|
||
return $"[{text}]({from.MakeRelativeUri(to)}#L{member.Location.Start.Line + 1})"; |
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.
The line number format should be configurable. For example, GitHub uses #L3-L7
, while Bitbucket uses #lines-3:7
.
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.
What do you think about extracting a new MdRendererOptions
class for tweaking such things?
For example, we could call the UseMdRenderer
method on the pipeline with few ways:
(the old one)
pipeline
.UseMdRenderer("...");
(the more customizable one)
pipeline
.UseMdRenderer(options => options
.CleanupOutputDir()
.UseGitHubMarkdown())
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 think it's a really good idea! I was also planning to raise a ticket to create a configuration mechanism for the pipeline, which I'll do shortly. 👍
var from = new Uri(_output); | ||
var to = new Uri(member.Location.Path); | ||
|
||
return $"[{text}]({from.MakeRelativeUri(to)}#L{member.Location.Start.Line + 1})"; |
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.
We should also consider adding columns to the URL (e.g., #L3C5
).
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.
This feature is busted!
Closes #41.