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

chore: fix spacing of js_library docstrings #961

Merged
merged 1 commit into from
Mar 24, 2023
Merged

Conversation

gregmagolan
Copy link
Member

@gregmagolan gregmagolan commented Mar 24, 2023

These docstrings indents are off

@alexeagle
Copy link
Member

alexeagle commented Mar 24, 2023

it's fixed in our stardoc actually...
bazelbuild/bazel#13403
aspect-forks/stardoc@34d1bdb
😁

That's why these things are correct on our docsite. It's stardoc that sucks, our code here was right.

@gregmagolan
Copy link
Member Author

gregmagolan commented Mar 24, 2023

The docsite I keep having to manually fix these strings after slurping & generating 😢

Maybe its not wired up properly in the generate step now?

@gregmagolan gregmagolan merged commit f11a05f into main Mar 24, 2023
@gregmagolan gregmagolan deleted the fix_docstrings branch March 24, 2023 04:43
@gregmagolan
Copy link
Member Author

gregmagolan commented Mar 24, 2023

Ohhh.. I see what the root cause is on the docsite. Some of these docstrings end up with mixed indentations since they are build up from string partials with format 😵‍💫

In which case, indenting the left on these is the simplest route to avoid the mixed indents.

@@ -46,45 +46,45 @@ _ATTRS = {
"srcs": attr.label_list(
doc = """Source files that are included in this library.
Copy link
Member

Choose a reason for hiding this comment

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

nit: when I'm paranoid and de-dent docs to the file level, I start with backslash-newline so the first line is also at column 0

          """\
First line goes here

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

Successfully merging this pull request may close these issues.

3 participants