azdo-cli 0.15.0-bugfix-76.581 → 0.15.0-bugfix-76.583

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.
Files changed (2) hide show
  1. package/dist/index.js +60 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1250,8 +1250,67 @@ function decodeEntitiesInMarkdownCodeSpans(text) {
1250
1250
  return "`" + decoded + "`";
1251
1251
  });
1252
1252
  }
1253
+ var ADO_NAMED_ENTITIES = {
1254
+ // HTML special characters
1255
+ lt: "<",
1256
+ gt: ">",
1257
+ quot: '"',
1258
+ apos: "'",
1259
+ // Dashes and punctuation
1260
+ mdash: "\u2014",
1261
+ ndash: "\u2013",
1262
+ hellip: "\u2026",
1263
+ lsquo: "\u2018",
1264
+ rsquo: "\u2019",
1265
+ ldquo: "\u201C",
1266
+ rdquo: "\u201D",
1267
+ sbquo: "\u201A",
1268
+ bdquo: "\u201E",
1269
+ laquo: "\xAB",
1270
+ raquo: "\xBB",
1271
+ lsaquo: "\u2039",
1272
+ rsaquo: "\u203A",
1273
+ // Common symbols
1274
+ copy: "\xA9",
1275
+ reg: "\xAE",
1276
+ trade: "\u2122",
1277
+ nbsp: "\xA0",
1278
+ euro: "\u20AC",
1279
+ pound: "\xA3",
1280
+ yen: "\xA5",
1281
+ cent: "\xA2",
1282
+ deg: "\xB0",
1283
+ plusmn: "\xB1",
1284
+ times: "\xD7",
1285
+ divide: "\xF7",
1286
+ micro: "\xB5",
1287
+ para: "\xB6",
1288
+ middot: "\xB7",
1289
+ frac12: "\xBD",
1290
+ frac14: "\xBC",
1291
+ frac34: "\xBE",
1292
+ sup2: "\xB2",
1293
+ sup3: "\xB3",
1294
+ bull: "\u2022",
1295
+ prime: "\u2032",
1296
+ Prime: "\u2033",
1297
+ minus: "\u2212",
1298
+ asymp: "\u2248",
1299
+ ne: "\u2260",
1300
+ le: "\u2264",
1301
+ ge: "\u2265",
1302
+ not: "\xAC",
1303
+ // Arrows
1304
+ larr: "\u2190",
1305
+ uarr: "\u2191",
1306
+ rarr: "\u2192",
1307
+ darr: "\u2193",
1308
+ harr: "\u2194",
1309
+ rArr: "\u21D2",
1310
+ lArr: "\u21D0"
1311
+ };
1253
1312
  function decodeAdoEntitiesInMarkdown(text) {
1254
- return text.replaceAll("&mdash;", "\u2014").replaceAll("&ndash;", "\u2013").replace(/&#x([0-9a-fA-F]+);/g, (_, hex) => String.fromCodePoint(parseInt(hex, 16))).replace(/&#([0-9]+);/g, (_, dec) => String.fromCodePoint(parseInt(dec, 10))).replace(/^(&gt; ?)+/gm, (match) => match.replaceAll("&gt;", ">"));
1313
+ return text.replace(/&([a-zA-Z]+);/g, (match, name) => ADO_NAMED_ENTITIES[name] ?? match).replace(/&#x([0-9a-fA-F]+);/g, (_, hex) => String.fromCodePoint(parseInt(hex, 16))).replace(/&#([0-9]+);/g, (_, dec) => String.fromCodePoint(parseInt(dec, 10))).replaceAll("&amp;", "&");
1255
1314
  }
1256
1315
  function htmlToMarkdown(html) {
1257
1316
  return NodeHtmlMarkdown.translate(escapeAnglesInCodeElements(html));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azdo-cli",
3
- "version": "0.15.0-bugfix-76.581",
3
+ "version": "0.15.0-bugfix-76.583",
4
4
  "description": "Azure DevOps CLI tool",
5
5
  "type": "module",
6
6
  "bin": {