code-lts / doctum

A php API documentation generator, fork of Sami
https://doctum.long-term.support/
MIT License
300 stars 32 forks source link

Don't inject `<br>` tags into `<pre>` examples #52

Closed tillkruss closed 2 years ago

tillkruss commented 2 years ago

<pre> tags shouldn't have any <br>s in them, it's the whole purpose and makes multiline examples looks really odd and spaced-out.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre

codecov[bot] commented 2 years ago

Codecov Report

Base: 56.25% // Head: 56.25% // No change to project coverage :thumbsup:

Coverage data is based on head (302b7aa) compared to base (661bf7b). Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #52 +/- ## ========================================= Coverage 56.25% 56.25% Complexity 1236 1236 ========================================= Files 53 53 Lines 3173 3173 ========================================= Hits 1785 1785 Misses 1388 1388 ``` Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=code-lts). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=code-lts)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

williamdes commented 2 years ago

Can you provide a doc block that I can add to my test cases?

tillkruss commented 2 years ago

Can you provide a doc block that I can add to my test cases?

I can't find any @example tests, happy to extend them.

Two @example blocks

/**
 * Elementum semper nullam primis tempus quisque tempor.
 *
 * @example $redis->copy('source1', 'newkey');
 * @example $redis->copy('source1', 'newkey', ['db' => 1]);
 */ 

Multiline @example block

/**
 * Elementum semper nullam primis tempus quisque tempor.
 *
 * @example
 * $redis->pipeline()
 *       ->select(1)
 *       ->del('newkey')
 *       ->select(0)
 *       ->del('newkey')
 *       ->mset(['source1' => 'value1', 'exists' => 'old_value'])
 *       ->exec();
 */ 
williamdes commented 1 year ago

Moved to v5.5.2 to be released today 🎉 5.6.0 will wait because of #51