Skip to content

Commit 0742e26

Browse files
committed
minor #19950 🎨 Fix precedence table rendering (homersimpsons)
This PR was submitted for the 7.1 branch but it was merged into the 6.4 branch instead. Discussion ---------- :art: Fix precedence table rendering Use rst grid to get the correct layout. `list-table` directive is not supported. This is a follow-up of #19894 which itself was a follow-up of !19860. The rendered HTML is now correct /cc `@OskarStark` `@javiereguiluz` Commits ------- f6b21f4 🎨 Fix precedence table rendering
2 parents ebfda14 + f6b21f4 commit 0742e26

File tree

1 file changed

+32
-20
lines changed

1 file changed

+32
-20
lines changed

reference/formats/expression_language.rst

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -436,26 +436,38 @@ parentheses in your expressions (e.g. ``(1 + 2) * 4`` or ``1 + (2 * 4)``.
436436
The following table summarizes the operators and their associativity from the
437437
**highest to the lowest precedence**:
438438

439-
======================================================= =============
440-
Operators associativity
441-
======================================================= =============
442-
``-``, ``+`` (unary operators that add the number sign) none
443-
``**`` right
444-
``*``, ``/``, ``%`` left
445-
``not``, ``!`` none
446-
``~`` left
447-
``+``, ``-`` left
448-
``..`` left
449-
``==``, ``===``, ``!=``, ``!==``, \ left
450-
``<``, ``>``, ``>=``, ``<=``, \
451-
``not in``, ``in``, ``contains``, \
452-
``starts with``, ``ends with``, ``matches``
453-
``&`` left
454-
``^`` left
455-
``|`` left
456-
``and``, ``&&`` left
457-
``or``, ``||`` left
458-
======================================================= =============
439+
+----------------------------------------------------------+---------------+
440+
| Operators | Associativity |
441+
+==========================================================+===============+
442+
| ``-`` , ``+`` (unary operators that add the number sign) | none |
443+
+----------------------------------------------------------+---------------+
444+
| ``**`` | right |
445+
+----------------------------------------------------------+---------------+
446+
| ``*``, ``/``, ``%`` | left |
447+
+----------------------------------------------------------+---------------+
448+
| ``not``, ``!`` | none |
449+
+----------------------------------------------------------+---------------+
450+
| ``~`` | left |
451+
+----------------------------------------------------------+---------------+
452+
| ``+``, ``-`` | left |
453+
+----------------------------------------------------------+---------------+
454+
| ``..`` | left |
455+
+----------------------------------------------------------+---------------+
456+
| ``==``, ``===``, ``!=``, ``!==``, | left |
457+
| ``<``, ``>``, ``>=``, ``<=``, | |
458+
| ``not in``, ``in``, ``contains``, | |
459+
| ``starts with``, ``ends with``, ``matches`` | |
460+
+----------------------------------------------------------+---------------+
461+
| ``&`` | left |
462+
+----------------------------------------------------------+---------------+
463+
| ``^`` | left |
464+
+----------------------------------------------------------+---------------+
465+
| ``|`` | left |
466+
+----------------------------------------------------------+---------------+
467+
| ``and``, ``&&`` | left |
468+
+----------------------------------------------------------+---------------+
469+
| ``or``, ``||`` | left |
470+
+----------------------------------------------------------+---------------+
459471

460472
Built-in Objects and Variables
461473
------------------------------

0 commit comments

Comments
 (0)