mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-29 18:27:56 +02:00
fix(theme-common): code block magic comments should support SQL block comments (#10782)
This commit is contained in:
parent
87a5ab9177
commit
2565601af3
2 changed files with 16 additions and 1 deletions
|
@ -107,9 +107,11 @@ function getAllMagicCommentDirectiveStyles(
|
|||
|
||||
case 'lua':
|
||||
case 'haskell':
|
||||
case 'sql':
|
||||
return getCommentPattern(['lua'], magicCommentDirectives);
|
||||
|
||||
case 'sql':
|
||||
return getCommentPattern(['lua', 'jsBlock'], magicCommentDirectives);
|
||||
|
||||
case 'wasm':
|
||||
return getCommentPattern(['wasm'], magicCommentDirectives);
|
||||
|
||||
|
|
|
@ -358,6 +358,19 @@ WHERE customer_id IN (
|
|||
)
|
||||
```
|
||||
|
||||
```sql title="sql_query_block.sql"
|
||||
/* highlight-start */
|
||||
SELECT *
|
||||
FROM orders
|
||||
/* highlight-end */
|
||||
WHERE customer_id IN (
|
||||
SELECT customer_id
|
||||
/* highlight-next-line */
|
||||
FROM customers
|
||||
WHERE country = 'USA'
|
||||
)
|
||||
```
|
||||
|
||||
```matlab title="matlab.m"
|
||||
% highlight-start
|
||||
function result = times2(n)
|
||||
|
|
Loading…
Add table
Reference in a new issue