@puregram/markup
Advanced tools
Comparing version 1.3.3 to 1.3.4
@@ -33,2 +33,16 @@ "use strict"; | ||
} | ||
else if (arg instanceof format_1.Formatted) { | ||
const actualEntities = []; | ||
for (const entity of arg.entities) { | ||
const payload = { | ||
...entity.payload, | ||
offset: entity.payload.offset + offset - 1 /* because of \n trimming at the start */ | ||
}; | ||
actualEntities.push(new puregram_1.MessageEntity(payload)); | ||
} | ||
const addition = arg.text.trim() + frame; | ||
result += addition; | ||
offset += addition.length; | ||
entities.push(...actualEntities.map(e => e.payload)); | ||
} | ||
else { | ||
@@ -35,0 +49,0 @@ const addition = arg + frame; |
{ | ||
"name": "@puregram/markup", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"description": "simple yet powerful markup system for puregram", | ||
@@ -12,4 +12,3 @@ "main": "./lib/index.js", | ||
"type": "git", | ||
"url": "git+https://github.com/nitreojs/puregram.git", | ||
"directory": "packages/markup" | ||
"url": "https://github.com/nitreojs/puregram/tree/lord/packages/markup" | ||
}, | ||
@@ -16,0 +15,0 @@ "types": "./lib/index.d.ts", |
20575
486