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

Warning for broken internal cross-references #175

Closed
Svish opened this issue Nov 12, 2015 · 6 comments
Closed

Warning for broken internal cross-references #175

Svish opened this issue Nov 12, 2015 · 6 comments

Comments

@Svish
Copy link

Svish commented Nov 12, 2015

Is there a way to enable warnings for broken cross references? Like I get if I try to include a file that doesn't exist, it would be nice with some warnings when I build if there's a cross reference that goes to nowhere.

@mojavelinux
Copy link
Member

It's not the job of the converter to validate cross references as that would require network access and drastically slow down the converter. However, I do support the idea of having a validate tool (or even phase) that would do this. One tool to use in the interim is html-proofer which works through a document to find broken links.

@Svish
Copy link
Author

Svish commented Nov 23, 2015

Was mainly thinking cross-references within the same document, so no network should be necessary then? I don't really know how any of this works, but to me it seems that it should be possible as broken cross-references seems to look different. They seem to get wrapped in square brackets. So to me it seems like there should be some sort of step in the process where it should be possible to throw out a warning of "hey, you should check out this broken cross-reference I just tried to process".

@mojavelinux
Copy link
Member

In that case, a warning on an internal cross reference is very reasonable. What we'll want to do is issue that warning and then hook it into the messages once we implement asciidoctor/asciidoctor#44.

Could you file an issue in core to issue a warning when an internal cross reference is not found? https://github.com/asciidoctor/asciidoctor Once we implement all these parts, it will just work in the Maven plugin.

@Svish
Copy link
Author

Svish commented Nov 27, 2015

Done @ asciidoctor/asciidoctor#1586 👍

@Svish Svish changed the title Warning for broken cross references Warning for broken internal cross-references Nov 27, 2015
@mojavelinux
Copy link
Member

Thanks!

@mojavelinux
Copy link
Member

Let's close this since we now have the issue in core.

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

2 participants