-
Notifications
You must be signed in to change notification settings - Fork 7
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
[Bug] Backing class JavaScript file not working if path contains underscore #70
Comments
didoo
added a commit
to hashicorp/design-system
that referenced
this issue
Oct 17, 2022
…(double dash) instead of `_` (underscore) in file names to avoid bug in Field Guide empress/field-guide#70
didoo
added a commit
to hashicorp/design-system
that referenced
this issue
Oct 17, 2022
… to Markdown to use `--` (double dash) instead of `_` (underscore) in file names to avoid bug in Field Guide empress/field-guide#70
didoo
added a commit
to hashicorp/design-system
that referenced
this issue
Oct 17, 2022
… to Markdown to use `--` (double dash) instead of `_` (underscore) in file names to avoid bug in Field Guide empress/field-guide#70
didoo
added a commit
to hashicorp/design-system
that referenced
this issue
Oct 17, 2022
… to Markdown to use `--` (double dash) instead of `_` (underscore) in file names to avoid bug in Field Guide empress/field-guide#70
didoo
added a commit
to hashicorp/design-system
that referenced
this issue
Oct 18, 2022
… to Markdown to use `--` (double dash) instead of `_` (underscore) in file names to avoid bug in Field Guide empress/field-guide#70
didoo
added a commit
to hashicorp/design-system
that referenced
this issue
Oct 18, 2022
… to Markdown to use `--` (double dash) instead of `_` (underscore) in file names to avoid bug in Field Guide empress/field-guide#70
didoo
added a commit
to hashicorp/design-system
that referenced
this issue
Oct 18, 2022
… to Markdown to use `--` (double dash) instead of `_` (underscore) in file names to avoid bug in Field Guide empress/field-guide#70
didoo
added a commit
to hashicorp/design-system
that referenced
this issue
Oct 18, 2022
… to Markdown to use `--` (double dash) instead of `_` (underscore) in file names to avoid bug in Field Guide empress/field-guide#70
didoo
added a commit
to hashicorp/design-system
that referenced
this issue
Oct 22, 2022
… to Markdown to use `--` (double dash) instead of `_` (underscore) in file names to avoid bug in Field Guide empress/field-guide#70
didoo
added a commit
to hashicorp/design-system
that referenced
this issue
Oct 24, 2022
… to Markdown to use `--` (double dash) instead of `_` (underscore) in file names to avoid bug in Field Guide empress/field-guide#70
didoo
added a commit
to hashicorp/design-system
that referenced
this issue
Oct 24, 2022
… to Markdown to use `--` (double dash) instead of `_` (underscore) in file names to avoid bug in Field Guide empress/field-guide#70
didoo
added a commit
to hashicorp/design-system
that referenced
this issue
Oct 25, 2022
… to Markdown to use `--` (double dash) instead of `_` (underscore) in file names to avoid bug in Field Guide empress/field-guide#70
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Probably a bug. Did some experiments to understand why in some cases the backing class JavaScript file associated with a Markdown file was not picked up, and I've found a strange behaviour. If the path of the file (be it a parent folder, or the file itself) contains an underscore (
_
) then the JS file is ignored.To test this I have forked this repo, and simply added a bunch of test files (direct copies of the
custom-button.js
+custom-button.md
demo files) and checked what happened in different cases.You can test yourself using this branch in my fork: https://github.com/didoo/field-guide-testing/tree/backing-class-path-underscore-bug/docs
Here's what I've found:
With a simple file name and a parent folder that doesn't contain an underscore - It works ✅
test-file.md
test-file.js
01-testing-normal-folder
You can see that it works by the `0` zero visible after the `Count` text (and clicking the button increases the value).
Same file but with an underscore in the name - It doesn't work ❌
test-file_with_underscore.md
test-file_with_underscore.js
01-testing-normal-folder
You can see that it works by the lack of`0` zero after the `Count` text and clicking the button triggers this error:
Same file with a
0x--
prefix - It works ✅01--test-file-with-number-prefix.md
01--test-file-with-number-prefix.js
01-testing-normal-folder
Same file with a
0x_
prefix in both the Markdown and the JS files - It doesn't work ❌02_test-file-with-number-prefix-and-underscore.md
02_test-file-with-number-prefix-and-underscore.js
01-testing-normal-folder
Same file with a
0x_
prefix in the Markdown, but a normal dash in the JS file - Strangely, it works 🤔03_test-file-with-number-prefix-and-mixed.md
03-test-file-with-number-prefix-and-mixed.js
01-testing-normal-folder
Same file with a parent folder that contains an underscore - It doesn't work ❌
test-file.md
test-file.js
02_testing-folder_with_underscore
The text was updated successfully, but these errors were encountered: