retype
retype copied to clipboard
Feature request: inline notes for code blocks
Hi there! Very happy user of Retype here. I was browsing some other documentation today and saw this feature that made my eyes pop -- is this something that might fit into Retype as well?
Take a look at any of the code blocks on this page: https://dirty-equals.helpmanual.io/ See the +
signs in the code blocks? Click them to get additional context information!
Here's the syntax for one of them (I've escaped the backticks from their code so it renders correctly):
Example:
\```py
title="Boolean Combination of Types"
from dirty_equals import HasLen, Contains
assert ['a', 'b', 'c'] == HasLen(3) & Contains('a') #(1)!
assert ['a', 'b', 'c'] == HasLen(3) | Contains('z') #(2)!
assert ['a', 'b', 'c'] != Contains('z')
assert ['a', 'b', 'c'] == ~Contains('z')
\```
1. The object on the left has to both have length 3 **and** contain `"a"`
2. The object on the left has to either have length 3 **or** contain `"z"`
I appreciate your time and consideration. Cheers!
Hey. Was looking for footnote support inside code blocks, but this would be even better :)
Hi there! Very happy user of Retype here. I was browsing some other documentation today and saw this feature that made my eyes pop -- is this something that might fit into Retype as well?
Take a look at any of the code blocks on this page: https://dirty-equals.helpmanual.io/ See the
+
signs in the code blocks? Click them to get additional context information!Here's the syntax for one of them (I've escaped the backticks from their code so it renders correctly):
Example: \```py title="Boolean Combination of Types" from dirty_equals import HasLen, Contains assert ['a', 'b', 'c'] == HasLen(3) & Contains('a') #(1)! assert ['a', 'b', 'c'] == HasLen(3) | Contains('z') #(2)! assert ['a', 'b', 'c'] != Contains('z') assert ['a', 'b', 'c'] == ~Contains('z') \``` 1. The object on the left has to both have length 3 **and** contain `"a"` 2. The object on the left has to either have length 3 **or** contain `"z"`
I appreciate your time and consideration. Cheers!
Hello, how about this?
<div title="your-text" markdown="1">
```py
title="Boolean Combination of Types"
from dirty_equals import HasLen, Contains
assert ['a', 'b', 'c'] == HasLen(3) & Contains('a') #(1)!
assert ['a', 'b', 'c'] == HasLen(3) | Contains('z') #(2)!
assert ['a', 'b', 'c'] != Contains('z')
assert ['a', 'b', 'c'] == ~Contains('z')
```
</div>
Yes, it definitely took a little effort to type it. But at least it worked.