-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
93112a4
commit 9557fc9
Showing
4 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
Submodule original-content
updated
372 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import type { Html } from 'mdast'; | ||
import { SKIP } from 'unist-util-visit'; | ||
|
||
import type { MacroFunction } from '../types.ts'; | ||
|
||
const BODY = | ||
'<strong>Це <a href="https://developer.mozilla.org/en-US/docs/MDN/Contribute/Guidelines/Conventions_definitions#experimental">експериментальна технологія</a></strong><br />Ретельно перевірте <a href="#sumisnist-iz-brauzeramy">таблицю сумісності з браузерами</a>, перш ніж використовувати її в роботі.'; | ||
const TITLE = 'Експериментальне'; | ||
|
||
function macro(): Html { | ||
return { | ||
type: 'html', | ||
value: `<div class="notecard experimental"><h4>${TITLE}</h4><p>${BODY}</p></div>`, | ||
}; | ||
} | ||
|
||
const SeeCompatTable: MacroFunction = (_node, index, parent) => { | ||
const replacement = macro(); | ||
parent.children[index] = replacement; | ||
return [SKIP, index]; | ||
}; | ||
|
||
export default SeeCompatTable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters