Implement Markdown definition lists (+ migration) (#20333)
Implements definition lists Markdown extension adopted in a few implementations including: * [Pandoc]( https://pandoc.org/MANUAL.html#definition-lists) * [kramdown]( https://kramdown.gettalong.org/quickref.html#definition-lists) * [PHP extra Markdown]( https://michelf.ca/projects/php-markdown/extra/#def-list) Also affected files have been migrated. RST definition lists are turned off for Markdown: this solves the problem of broken formatting mentioned in https://github.com/nim-lang/Nim/pull/20292.
This commit is contained in:
parent
846cc746a2
commit
088487f652
15 changed files with 266 additions and 97 deletions
|
|
@ -78,19 +78,23 @@ proc floorDivPow2(x: int32; n: int32): int32 {.inline.} =
|
|||
return x shr n
|
||||
|
||||
## Returns floor(log_10(2^e))
|
||||
## ```c
|
||||
## static inline int32_t FloorLog10Pow2(int32_t e)
|
||||
## {
|
||||
## SF_ASSERT(e >= -1500);
|
||||
## SF_ASSERT(e <= 1500);
|
||||
## return FloorDivPow2(e * 1262611, 22);
|
||||
## }
|
||||
## ```
|
||||
## Returns floor(log_10(3/4 2^e))
|
||||
## ```c
|
||||
## static inline int32_t FloorLog10ThreeQuartersPow2(int32_t e)
|
||||
## {
|
||||
## SF_ASSERT(e >= -1500);
|
||||
## SF_ASSERT(e <= 1500);
|
||||
## return FloorDivPow2(e * 1262611 - 524031, 22);
|
||||
## }
|
||||
## ```
|
||||
## Returns floor(log_2(10^e))
|
||||
|
||||
proc floorLog2Pow10(e: int32): int32 {.inline.} =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue