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

Renders AGS Script and Public key asc files as AsciiDoc #468

Closed
edmundito opened this issue Mar 10, 2015 · 11 comments
Closed

Renders AGS Script and Public key asc files as AsciiDoc #468

edmundito opened this issue Mar 10, 2015 · 11 comments

Comments

@edmundito
Copy link

Originally described in github-linguist/linguist#1638:

The markup renderer currently detects all files with .asc extensions as AsciiDoc, although the file extension is also used for AGS Script and Public Key files.

markup(:asciidoctor, /adoc|asc(iidoc)?/) do |content|

This leads to files to be rendered in an unreadable way:
https://github.com/vasofilipov/wisp-game/blob/master/Code/ASCII%20Quick%20Converter.asc

@mojavelinux
Copy link
Contributor

I'm a strong supporter of dropping .asc as a recognized AsciiDoc file extension for this very reason. I believe that .adoc and .asciidoc are sufficient and have helped to move the industry in that direction. As the lead of the Asciidoctor project and AsciiDoc language maintainer, you have my vote.

@bkeepers
Copy link
Contributor

I'm a strong supporter of dropping .asc as a recognized AsciiDoc file extension for this very reason.

Sounds good to me.

/cc @github/languages @github/user-content

@aroben
Copy link

aroben commented Mar 12, 2015

Any idea how common .asc vs .adoc/.asciidoc is on GitHub?

@edmundito
Copy link
Author

Unsure, but https://github.com/progit/progit2, one of the most definitive guides to using git, uses .asc files.

@mojavelinux
Copy link
Contributor

mojavelinux commented Mar 12, 2015 via email

@bkeepers
Copy link
Contributor

I talked with @arfon and @schacon about this. I think we will need to push the detection into https://github.com/github/linguist, and only render it if linguist thinks it's asciidoc.

We're also going to have to improve our asciidoc heuristic.

@edmundito edmundito changed the title Renders AGS Script and Plublic key asc files as AsciiDoc Renders AGS Script and Public key asc files as AsciiDoc Mar 13, 2015
@schacon
Copy link
Contributor

schacon commented Mar 13, 2015

Sorry about that - both Pro Git and the Atom guide are .asc formatted. It wouldn't be horrible to change them though, if it was really important. I just never knew it was an issue.

@justinclift
Copy link

@mojavelinux This is just a file extension change needed yeah? There's no change in actual markup needed (eg for Pro Git 2)?

If that's the case, it should be reasonably straightforward to adjust Pro Git 2 at least. 😄

@mojavelinux
Copy link
Contributor

Sorry about that - both Pro Git and the Atom guide are .asc formatted ... I just never knew it was an issue.

No need to apologize. This is a fairly new recommendation and probably just getting the light of day here.

The previous AsciiDoc leadership was never clear about file extensions. In fact, the original guide recommended the use of .txt for the longest time (it may even still say that). As a result, we ended up with a plethora of extensions as the community made them up (including O'Reilly).

The new leadership (under Asciidoctor) is helping to provide some guidance and cleanup ambiguities in AsciiDoc. We recognized the file extension conflict with the armored file format and added the recommendation against using it on asciidoctor.org. If we get it dropped from GitHub, then it will solidify this recommendation (and resolve the conflict).

In short, it's not a huge deal, but fixing these little broken windows makes AsciiDoc stronger.

@mojavelinux
Copy link
Contributor

I think we will need to push the detection into https://github.com/github/linguist, and only render it if linguist thinks it's asciidoc.

That's actually a nice approach. I still like the idea of steering writers away from the .asc extension, but this way we could do that through communication instead of by breaking existing behavior.

@kivikakk
Copy link
Contributor

We're now using Linguist (thanks to #537), and its heuristics do a good job of picking the correct actual language given a .asc file 👍

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

8 participants
@schacon @bkeepers @kivikakk @mojavelinux @edmundito @justinclift @aroben and others