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

Extraneous space after asciidoc formatting #381

Closed
dnowacki-usgs opened this issue Aug 31, 2022 · 6 comments
Closed

Extraneous space after asciidoc formatting #381

dnowacki-usgs opened this issue Aug 31, 2022 · 6 comments

Comments

@dnowacki-usgs
Copy link
Contributor

In reading through the CF Conventions document, I noticed what seem to be extraneous spaces between AsciiDoc formatting and punctuation marks. For instance, consider this text in section 1.4:

Each variable in a netCDF file has an associated description which is provided by the attributes **`units`** , **`long_name`** , and **`standard_name`** . The **`units`** , and **`long_name`** attributes are defined in the NUG and the **`standard_name`** attribute is defined in this document.

I've reproduced the first instance below:

**`units`** ,

Note the space between the bolded, monospaced units text and the comma that follows.

I have found examples between formatted text and following commas, periods, and parentheses. Spaces also sometimes occur after cross-references (using <<>> syntax). In one or two cases I have found an example with a space between a preceding parenthesis and formatted text.

Given the spaces generally don't exist for non-formatted text (e.g., there is no space between the word "document" and the period in the example sentence above), it doesn't seem to be a conscious style decision. It's also not a limitation of AsciiDoc as far as I can tell; after removing some example spaces I built the text locally successfully with asciidoctor.

Would folks be supportive of a PR removing these spaces? Or am I misunderstanding an intentional decision?

@erget
Copy link
Member

erget commented Aug 31, 2022

Hi @dnowacki-usgs , thanks for these ideas - actually we are planning a few hackathons at the upcoming CF Community Meeting and this sounds like it would be well-aligned with cleanup work plus creating / endorsing use of an AsciiDoc style guide. Are you coming to the workshop? Your participation would be very welcome, hybrid or in-person! Otherwise a PR would be useful, as we could use that as a starting point for a syntax cleanup.

@dnowacki-usgs
Copy link
Contributor Author

Thanks @erget. I signed up for the virtual option, although it will be a stretch for me as I'm 9 hours behind Santander time. I'll try to put together a PR before the conference.

@dnowacki-usgs
Copy link
Contributor Author

Okay, I have started a pull request that removes extraneous spaces. This addresses spaces preceding .,]) and spaces following [(. I didn't modify anything in the ncdump-ish output code blocks or most other code blocks, although there were a few that I changed—mostly in pseudo code function definitions.

As for a style guide, I didn't see much out there. I was unable to find any black-style automated doc formatters for AsciiDoc. This recommended practices document is among the few I could find for a starting point for a style guide.

@erget
Copy link
Member

erget commented Sep 2, 2022

I like the recommended practices - thanks for the PR! This puts us on good footing for the upcoming hackathons :)

@erget erget moved this to In Progress in Housekeeping at 2022 workshop Sep 13, 2022
@erget erget linked a pull request Sep 13, 2022 that will close this issue
4 tasks
@erget
Copy link
Member

erget commented Sep 13, 2022

Hi @dnowacki-usgs - we're startng our hackathons in a few hours from https://github.com/cf-convention/cf-conventions/tree/386-cleanup-line-breaks-asciidoc - still WIP but you might be interested. Is #382 ready to be merged?

@erget
Copy link
Member

erget commented Sep 13, 2022

The commits in #382 have been merged as part of the merge of #386. Thanks a bunch @dnowacki-usgs !

@erget erget closed this as completed Sep 13, 2022
Repository owner moved this from In Progress to Done in Housekeeping at 2022 workshop Sep 13, 2022
jesusff added a commit to jesusff/cf-conventions that referenced this issue Sep 13, 2022
Remove extra spaces when boldface words appeared before comma and period.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants