-
Notifications
You must be signed in to change notification settings - Fork 29
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
Document specifying beautifier config file, use Docusaurus tabs for code #211
base: master
Are you sure you want to change the base?
Conversation
Looks like there's a problem: https://deploy-preview-211--unibeautify.netlify.com/docs/option-indent-size |
docs/options-for-beautifiers.md
Outdated
@@ -36,3 +36,16 @@ If the beautifier's configuration file is found then Unibeautify's own configura | |||
This is useful when Unibeautify does not support an option and you want more control over a specific beautifier. | |||
|
|||
> Only certain beautifiers support the `prefer_beautifier_config` option. See the `Advanced` section on a beautifier's page to see what beautifier options are supported. For example, see the [PHP-CS-Fixer beautifier](/docs/beautifier-php-cs-fixer.html#advanced). | |||
|
|||
> You can also specify the absolute path to the beautifier's config file by putting a string in the `prefer_beautifier_config` option. It will otherwise look in the directory of the file being beautified, and if it doesn't find it there, will go to the parent directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't look great right now: https://deploy-preview-211--unibeautify.netlify.com/docs/options-for-beautifiers
Maybe could add a note about prefer_beautifier_config
being of type boolean | string
?
And add a sub-section:
> You can also specify the absolute path to the beautifier's config file by putting a string in the `prefer_beautifier_config` option. It will otherwise look in the directory of the file being beautified, and if it doesn't find it there, will go to the parent directory. | |
### Config File Path | |
You can also specify the absolute path to the beautifier's config file by putting a string in the `prefer_beautifier_config` option. It will otherwise look in the directory of the file being beautified, and if it doesn't find it there, will go to the parent directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated it locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stevenzeck Thoughts on moving this docs update into a separate smaller PR? I think the code tabs change is going to take more time.
@Glavin001 the issue looks to be due to lines like https://github.com/Unibeautify/ugly-samples/blob/master/samples/ColdFusion/indent_size.txt#L12 and https://github.com/Unibeautify/ugly-samples/blob/master/samples/Riot/indent_size.txt#L3. Basically any line that starts with/contains |
Not sure if there's a bug we can fix in facebook/docusaurus#1063 involving the parsing of |
Looks like there are more examples: https://github.com/Unibeautify/ugly-samples/search?q=%22%3C%21--%22&unscoped_q=%22%3C%21--%22 |
@stevenzeck I created facebook/docusaurus#1260 |
example && isDefault ? 'selected="selected"' : "" | ||
} data-text="${ | ||
language.name | ||
}" value="${language.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stevenzeck Before we had the direct links to select the appropriate tab: https://unibeautify.com/docs/option-end-with-newline.html?language=html
Now the similar link will no longer select the code tab: https://deploy-preview-211--unibeautify.netlify.com/docs/option-end-with-newline.html?language=html
I do want to continue to support this feature.
@@ -34,6 +35,7 @@ window.onpopstate = function onPageChange(event) { | |||
|
|||
function updateCodeExample(languageName) { | |||
languageName = fixLanguage(languageName); | |||
element = [...document.querySelectorAll(".nav-tabs .nav-link")].filter(text => text.textContent === languageName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stevenzeck is this element
used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is going to be redone.
Closes #196, #210