Unexpected behavior when there is a single character surrounded by underscores

Hi,

I have used OOD 3.1.4. I’ve encountered what is probably a very minor bug, so I’d like to report it.

I want to make the “bb_c_dd” invisible, but the “bb_c_dd” is visible in the form.yml below.

---
form:
- aa
- bb_c_dd
attributes:
  aa:
    widget: select
    options:
      - [ "foo", "foo",	data-hide-bb-c-dd: true]
  bb_c_dd:
    widget: text_field

Now, if you change the name to something like “bb_cc_dd”, it will work as expected.

It seems that when the number of characters surrounded by underscores is 1, unexpected behavior occurs.

Best,

Hello, thank you for reporting this bug to us! I’ve been able to reproduce and have created a GH issue:

Would this also be the same issue I’m seeing with auto_modules? In this case, I’m not able to hide auto_modules_r.

  environment_check:
    label: Environment selection
    widget: select
    options:
      - [ "Use default environment", "0", data-hide-custom-environment: true ]
      - [ "Use custom environment", "1", data-hide-auto-modules-r: true, data-hide-texlive-load: true ]
  auto_modules_r:
    label: "R version (ignored with custom environment)"
  texlive_load:
    widget: check_box
    checked_value: 1
    unchecked_value: 0
    label: "Enable LaTeX (texlive) support"
    help: |
      - TeX/LaTeX (texlive) for using RMarkdown/Knit
      - Alternatively, consider using [TinyTeX] R package
        [TinyTeX]: https://yihui.org/tinytex/

Not sure, but I can take a look at it.

Yes, auto_modules_r is impacted by this bug.

1 Like

Good to know. Thanks for verifying! I’ll track it on GitHub.