fumadocs-core 15.3.0 → 15.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -184,6 +184,14 @@ var metaValues = [
184
184
  {
185
185
  name: "tab",
186
186
  regex: /tab="(?<value>[^"]+)"/
187
+ },
188
+ {
189
+ regex: /lineNumbers=(\d+)|lineNumbers/,
190
+ onSet(map, args) {
191
+ map["data-line-numbers"] = true;
192
+ if (args[0] !== void 0)
193
+ map["data-line-numbers-start"] = Number(args[0]);
194
+ }
187
195
  }
188
196
  ];
189
197
  var rehypeCodeDefaultOptions = {
@@ -207,8 +215,12 @@ var rehypeCodeDefaultOptions = {
207
215
  const map = {};
208
216
  for (const value of metaValues) {
209
217
  meta = meta.replace(value.regex, (_, ...args) => {
210
- const first = args.at(0);
211
- map[value.name] = typeof first === "string" ? first : "";
218
+ if ("onSet" in value) {
219
+ value.onSet(map, args);
220
+ } else {
221
+ const first = args.at(0);
222
+ map[value.name] = typeof first === "string" ? first : "";
223
+ }
212
224
  return "";
213
225
  });
214
226
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-core",
3
- "version": "15.3.0",
3
+ "version": "15.3.1",
4
4
  "description": "The library for building a documentation website in Next.js",
5
5
  "keywords": [
6
6
  "NextJs",