Skip to content

Support for relative http/file links? #147

@rwstauner

Description

@rwstauner

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions