You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,16 +20,20 @@ yarn add remark-corepass
20
20
21
21
Integrate the plugin into your Remark processing pipeline to automatically convert CorePass notations and optionally validate ICAN (International Core Asset Number) identifiers:
22
22
23
-
```javascript
24
-
constremark=require('remark');
25
-
constremarkCorepass=require('remark-corepass');
26
-
27
-
remark()
28
-
.use(remarkCorepass, { enableIcanCheck:true })
29
-
.process('Your markdown text here', (err, file) => {
30
-
if (err) throw err;
23
+
```typescript
24
+
importremarkfrom'remark';
25
+
importremarkCorepassfrom'remark-corepass';
26
+
27
+
(async () => {
28
+
try {
29
+
const file =awaitremark()
30
+
.use(remarkCorepass, { enableIcanCheck: true })
31
+
.process('Your markdown text here');
31
32
console.log(String(file));
32
-
});
33
+
} catch (err) {
34
+
console.error(err);
35
+
}
36
+
})();
33
37
```
34
38
35
39
The plugin searches for CorePass notations in the format `[domain@coreid]` or `[!cb1234...@coreid]` in your markdown content, converting them into clickable links and validating ICAN identifiers when enabled.
0 commit comments