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

Document specifying beautifier config file, use Docusaurus tabs for code #211

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

stevenzeck
Copy link
Contributor

@stevenzeck stevenzeck commented Mar 4, 2019

Closes #196, #210

@Glavin001
Copy link
Member

@@ -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.
Copy link
Member

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

image

Maybe could add a note about prefer_beautifier_config being of type boolean | string?
And add a sub-section:

Suggested change
> 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated it locally.

Copy link
Member

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.

@stevenzeck
Copy link
Contributor Author

@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 <!-- / -->. Docusaurus treats them as tabs.

@Glavin001
Copy link
Member

Glavin001 commented Mar 4, 2019

Not sure if there's a bug we can fix in facebook/docusaurus#1063 involving the parsing of <!--- ---> 🤔

@Glavin001
Copy link
Member

@Glavin001
Copy link
Member

@stevenzeck I created facebook/docusaurus#1260

example && isDefault ? 'selected="selected"' : ""
} data-text="${
language.name
}" value="${language.name
Copy link
Member

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);
Copy link
Member

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?

Copy link
Contributor Author

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.

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

Successfully merging this pull request may close these issues.

Improve Multi-Select Code Blocks
2 participants