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

No link on parameter in demo.openfisca.org #208

Open
sandcha opened this issue Oct 16, 2018 · 1 comment
Open

No link on parameter in demo.openfisca.org #208

sandcha opened this issue Oct 16, 2018 · 1 comment
Labels

Comments

@sandcha
Copy link
Contributor

sandcha commented Oct 16, 2018

On http://demo.openfisca.org/legislation/basic_income, I expect to see a link leading to parameter's page on benefits.basic_income but I get simple text.
Browser: Safari 12.0

@Morendil
Copy link
Contributor

Same on Chrome 69 / Mac.

Has this worked before, is it a regression ?

Looking at the code:

splitAndLinkParams = (text) => {

…what I suspect is that it never did work previously for this particular way of getting at the parameters, where we are directly using a parameter value * parameters(period).benefits.basic_income, not assigning to a temporary variable. The regex only works if there is an "=" before "parameters".

This whole approach of matching with regexes in the explorer is brittle, hard to read and debug, and hard to scale to different cases. ISTM that matching the parameters in the API instead, via AST search, would be more robust. (Not trivial, admittedly.)

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

No branches or pull requests

3 participants