Open carnevlu opened 9 years ago
Hmm.. the first comment (usually the DocBlock) should be stripped from the package when built.
Thx for your reply!
If I understand correctly, is correct that the DocBlock stay if the package is installed via repoman.
Correct: installing via Repoman does not strip out DocBlocks. Repoman installs are intended more for dev scenarios, and Repoman uses the info in the DocBlocks, so it doesn't strip them.
Thx for the explication,
maybe will be useful to add a notice in the wiki/DocBlocks about this behaviour.
what do you think?
something like:
... @property_preprocess for a Snippet or @templatename for a Template. The most common attributes are shown below.
Notice that the dockblock are filtered only in the package's build process. Otherwise the docblock stay as part of the code as comment.
hi @fireproofsocks in fact the DocBlocks aren't striped out.
can you help me to fix thix issues?
I'm searching on where this pre-process should be do... maybe in https://github.com/craftsmancoding/repoman/blob/master/model/repoman/repoman.class.php ?
It'd be somewhere in the parser sub classes...
Hi @fireproofsocks thx for your reply.
I tried to analyse the problem, in particular for the chunk (modchunk.php) and at line 29
$string = preg_replace('#(' . preg_quote($this->dox_start) . ')(.*)(' . preg_quote($this->dox_end) . ')#Uis', '', $string, 1);
If my interpretation is correct the "core" of the regex don't consider the return character in the DocBlock.
What do you think? can be this one the problem?
Maybe replacing
(.*)
with (.*[\n]*)+
will fix the problem??I'll try that in the next week, at the moment I'm a little bit out of time :(
That is not the problem. Tested from the terminal with debug 4 and... your code generate the great result (in the parser)... but in the build process (i don't know where) it lost that code and use these with DocBlock...
Yeah, there should be a unit test for that case. This might be trickier to pinpoint.
hi,
there is a way to remove/filter DocBlock from the output?
Example, in case of a template, i wouldn't that the name of the template is available in the source code of each page that use it.