Docgen: replace all instances.

This commit is contained in:
Koenkk
2018-05-24 12:50:54 +02:00
parent 92d0e44184
commit 06f6329241
+1 -1
View File
@@ -26,7 +26,7 @@ const logDevices = (devices) => {
result += '| ------------- | ------------- | -------------------------- |\n';
devices = new Map(devices.map((d) => [d.model, d]));
devices.forEach((device) => {
const pathFriendly = device.model.replace('/', '-').replace(':', '-').replace(' ', '-');
const pathFriendly = device.model.replace(new RegExp("/", "g"), '-').replace(new RegExp(":", "g"), '-').replace(new RegExp(" ", "g"), '-');
result += `| ${device.model} | ${device.vendor} ${device.description} (${device.supports}) | ![${pathFriendly}](images/devices/${pathFriendly}.jpg) |\n`;
});