Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

Honor variable interpolation #16

Open
thom4parisot opened this issue Jan 1, 2019 · 1 comment
Open

Honor variable interpolation #16

thom4parisot opened this issue Jan 1, 2019 · 1 comment

Comments

@thom4parisot
Copy link

thom4parisot commented Jan 1, 2019

Hello,

Thank you for the tool. It is very handy to use, especially with npx.

In some documents of mine, I construct links dynamically, like:

:v: 10
:nodeV: 10.9.0

[subs="+attributes"]
----
$ curl -sS https://nodejs.org/dist/v{nodeV}/node-v{nodeV}.tar.gz \
  | tar -zxf -
$ cd node-v{nodeV}
$ ./configure && make && make install
----

[subs="+attributes"]
----
$ sudo su
$ curl -sL https://deb.nodesource.com/setup_{v}.x | bash -
$ sudo apt-get install -y nodejs
----

Both links are detected but because the document is not evaluated with variables, they are considered as broken.

[✖] https://deb.nodesource.com/setup_
[✖] https://nodejs.org/dist/v

I don't know what would be the best/easiest way to avoid this false negatives. Maybe if I check on the rendered HTML instead? What do you think?

@gaurav-nelson
Copy link
Owner

@oncletom Thank you for creating this issue. I did wanted to include this when I first started working on this but diddn't get to it because there isn't a common rule to identify where the definitions might be.

Can you help me brainstorm some approaches we could take to accomplish this?
For example:

  • We can add an option to specify where the definitions for variable exist. So user can specify it during run time. For example: $ asciidoc-link-check abcd.adoc -d definitions.adoc
  • or we can just check the same file and see if the definitions exist in the file itself.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants