Skip to content

Not All paragraphs start with a capital letter, as usual English text. #1298

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

Closed
nobu opened this issue Feb 27, 2025 · 2 comments · Fixed by #1299
Closed

Not All paragraphs start with a capital letter, as usual English text. #1298

nobu opened this issue Feb 27, 2025 · 2 comments · Fixed by #1299

Comments

@nobu
Copy link
Member

nobu commented Feb 27, 2025

#1091 added excerpts.
But not all paragraphs in documentations start with a capital letter, as usual English text.

E.g., README.md in drb has the paragraph:

dRuby is a distributed object system for Ruby. It allows an object in one
Ruby process to invoke methods on an object in another Ruby process on the
same or a different machine.

d of dRuby should not be excluded, I think it should be any text, from the alphabet to the first period, excluding some symbols.

However, this is still too strict for most natural languages.

Originally posted by @nobu in #1091 (comment)

@vinistock
Copy link
Collaborator

The decision to search for an initial capital letter is indeed a bit too simple, but for context the goal was to ignore links or badges that are usually included in the README.

For example:

[some_badge](https://...)

https://github.com

We might need to come up with some regex to find the beginning of the first content paragraph.

@nobu
Copy link
Member Author

nobu commented Feb 27, 2025

maybe /\p{Letter}[^.:\/]+\./?

nobu added a commit to nobu/rdoc that referenced this issue Feb 28, 2025
Fix ruby#1298
Not all paragraphs in documentations start with a capital letter, as
usual English text.
@nobu nobu closed this as completed in #1299 Mar 8, 2025
@nobu nobu closed this as completed in 3351d5b Mar 8, 2025
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 a pull request may close this issue.

2 participants