The Crystal Programming Language Forum

Documentation improvement: %r in regex

After some searching I found that you can use %r{} to set an alternative delimiter for the regexes allowing one to avoid the leaning toothpick problem. I don’t see this mentioned in Regex
I thought opening an Issue asking this to be added but there is no “Documentation improvement” entry.

So how should I proceed?

Documentation about regex literals is in the language reference: Regex - Crystal
I don’t think this needs to be repeated in the API docs, but there should clearly be a link to the reference.
I have created an issue for this: Add links to literals in the language reference · Issue #10731 · crystal-lang/crystal · GitHub

About the create-issue page: There is no specific entry for documentation, it’s treated the same way as code. So it would either be filed as a documentation bug or feature request. I understand this may not be easy to decide, especially if not familiar with the internal processes. It doesn’t really matter though, because that selection just serves as a basis, maintainers will move it around later if necessary. It may hold people back from reporting, though, so I think this might need improvement.
I’m not entirely happy about the selection options myself. I’m not sure what’s the best way to improve it, though. Do you have any suggestions? What would you find useful?

Adding more entries (like “Request for improving documentation”) IMO doesn’t help much, it justs makes it harder because you have more options to chose from. The process of filing an issue should be as easy as possible and require no knowledge of the proceedings behind it.
I also realize that “Language Improvement Discussion” and “Feature Request” are very similar in scope. Every feature proposal effectively starts as a discussion. So those could probably be merged.
Maybe there should be a plain entry for “anything else”?