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
New pod config option: 'signature' #814
Conversation
…nt type documentation to it's usage instead of brackets addition. See #794 (comment)
It sure feels a bit wordy, but some solution like "Let's check it with regexes and hope it didn't break somewhere" or something similar is not cool too. |
What about changing this: $content.subst("\n", "\{\} \n", :g) to something like this (untested): $content.subst(/ [ ')' | returns \s+ \S+ ] <( $$ /, ' {}', :g) This way it should support multi-line signatures as well. Like the one on Str#split |
@AlexDaniel my code was tested on all(updated) pages that start with "A" character. I'll try your variant, but it seems a bit more obscure, than mine(or not). If it passes, I'll likely update my pr. |
On Friday, August 5, 2016, Altai-man notifications@github.com wrote:
|
@tbrowder, I believe that Rakudo and Perl 6 grammar itself have nothing to do with how exactly we "test" our documentation, it's a separate thing. It is a custom option that is useful for the documentation testing, but it's definitely not mandatory. S26 only defines a presentation. It doesn't say anything about testing the examples. Please, correct me if I'm wrong here. For example, someone can implement an another way to test the documentation and just ignore this config option. If you'll argue that we need to replace explicit signature marking with implicit signature guessing(like 'If there a word I'm not a S26 specialist, but by previously added |
Also, after your comment I thought a lot about implicit detection and now it looks for me as a really better solution than explicit marking. |
On Sunday, August 7, 2016, Altai-man notifications@github.com wrote:
|
@tbrowder in fact, the pod testing doesn't affect the html or any other output format. But yes, you're totally correct. |
See #794 (comment)
Firstly, cast @gfldex, since he is the main inventor of our doc-compiling project.
Since we need to compile signatures(errors occur there too) we need some method/routine/sub body to compile it without error. The thing is, we don't want reader to see this ugly
{}
empty method body.Because of that, using @coke advice, I've implemented this option. If you write it like this:
or even like that
empty brackets will be added automatically(in second case, for every string respectively).
My English is less than awesome(I guess, it really is), so I'll be really grateful if someone will fix up my bad-written description at the
CONTRIBUTION.md
page.It can be merged if @gfldex approves.