Skip to content

README symlink shown as plain text despite vim modeline #1158

Description

@jwilk

I have the following setup in many of my repositories:

  1. doc/README is a document with a vim:ft=rst modeline. As expected, this is rendered by GitHub as reStructuredText.

  2. Top-level README is a symlink to doc/README. This used to rendered by GitHub as reStructuredText until recently. But now it is shown as plain text. :-(

Examples:

I guess it might be an unintended consequence of fixing #1133?

Activity

  1. kiwiroy commented on Feb 1, 2018

    @kiwiroy
    Contributor

    I'm seeing this too with a toplevel README.md that is a symlink through multiple subdirectories to another README.md and is displayed as plain text. There are no modelines in the target README.md and it is rendered correctly as markdown when viewing that directory.

  2. jwilk commented on Feb 9, 2018

    @jwilk
    Author
    • good (thanks to caching?)

    Oh well, this one is now bad, too. But I made archived copy back when it was still good.

  3. added a commit that references this issue on Feb 9, 2018
  4. kivikakk commented on Sep 18, 2018

    @kivikakk
    Contributor

    These all appear working for me! Let me know if the behaviour still looks broken to you, but I'm seeing all READMEs rendered correctly (despite their being symlinks).

  5. added a commit that references this issue on Oct 16, 2018
  6. jwilk commented on Oct 16, 2018

    @jwilk
    Author

    The bug is still there.
    I've set up demonstration repo here:
    https://github.com/jwilk-forks/github-markup/tree/issue1158

  7. kiwiroy commented on Jan 3, 2019

    @kiwiroy
    Contributor

    Can this be reopened? Or is it best to create a new issue requesting documentation of what is and isn't supported regarding this feature? I and others (#21) are confused.

  8. kivikakk commented on Jan 6, 2019

    @kivikakk
    Contributor

    The bug is still there.
    I've set up demonstration repo here:
    https://github.com/jwilk-forks/github-markup/tree/issue1158

    It looks like there's a README (no extension, treated as plaintext) symlinked to doc/README (which shows as Markdown due to the Vim modeline). The top-level README shows as plaintext, as the filename overrides any other result -- this is probably the missing key. Documentation PRs happily accepted, although they should probably be against Linguist -- the change occurred at github-linguist/linguist#3946.

  9. kiwiroy commented on Jan 6, 2019

    @kiwiroy
    Contributor

    There was also some discussion in github-linguist/linguist#3948 I found.

    I see that there is a fundamental difference between what is expected in the two use cases here.

    @jwilk would like the contents of the target of the symlink to be examined. The mode line is informative and the desired behaviour and also the discriminator between plain text and markdown - otherwise the content of doc/README appears as plain text to classification (assumption).

    In the other use case, the purpose is to change to way a file is processed by augmenting the extension on the filename in the symlink. The difference in the extensions (between the link name and the target) is informative in this case and defines the behaviour.

    I'm unsure how the symlink README.pod in https://github.com/jhthorsen/applify is being treated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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