Skip to content
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

Support for relative http/file links? #147

Open
rwstauner opened this issue Aug 29, 2022 · 0 comments
Open

Support for relative http/file links? #147

rwstauner opened this issue Aug 29, 2022 · 0 comments

Comments

@rwstauner
Copy link
Contributor

Has support ever been considered for links like <text|./some/file> ?

I received this question on Pod::Markdown rwstauner/Pod-Markdown#23

From the context of markdown/html, it's a reasonable request.

Right now Pod::Markdown has code like this: https://github.com/rwstauner/Pod-Markdown/blob/master/lib/Pod/Markdown.pm#L1129-L1134

sub   end_L {
  my ($self) = @_;
  my $flags = pop @{ $self->_private->{link} }
    or die 'Invalid state: link end with no link start';

  my ($type, $to, $section) = @{$flags}{qw( type to section )};

The $to param from Pod::Simple is "." which makes sense based on the pod spec, but i'm not sure if that's useful.

I considered adding this code to Pod::Markdown:

  if ($to eq '.') {
    $type = 'url';
    $to = "$to/$section";
  }

and then I thought I should ask for thoughts here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant