google / gitiles

A simple browser for Git repositories.
https://gerrit.googlesource.com/gitiles/
Other
582 stars 174 forks source link

Links to local files are not recognized without alt-text #92

Closed oberlies closed 7 years ago

oberlies commented 7 years ago

Gitiles correctly renders links to local files if they have an alt text:

![alt text](image.png)

However it fails to recognize the following:

![](image.png)

Although not being accessible, the latter is common syntax in markdown. Gitiles should also recognize it.

oberlies commented 7 years ago

The syntax without link text is allowed by the CommonMark specification: http://spec.commonmark.org/0.27/#example-550

oberlies commented 7 years ago

This is not an issue in recent Gitiles versions. E.g. 0.1-11 (included in Gerrit 2.13) already renders this correctly.

oberlies commented 7 years ago

If anyone is interested: I added some files so that Gitiles 0.1-11 can be imported with m2eclipse, and then created a JUnit test that converts all markdown files from a folder to HTML -> see https://github.com/oberlies/gitiles/commits/v0.1-11-test

Really neat for quickly trying out how the Gitiles renderer handles corner cases!