Skip to content

Commit

Permalink
Convert non-breaking hyphens to breaking ones (foundryvtt#10480)
Browse files Browse the repository at this point in the history
  • Loading branch information
stwlam committed Oct 2, 2023
1 parent d0f3a9f commit 58ba6b1
Show file tree
Hide file tree
Showing 3,922 changed files with 4,711 additions and 4,714 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
39 changes: 18 additions & 21 deletions build/lib/extractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,27 +373,24 @@ class PackExtractor {
});
}

return (
container.innerHTML
.replace(/<([hb]r)>/g, "<$1 />") // Prefer self-closing tags
.replace(/<\/p> ?<p>/g, "</p>\n<p>")
.replace(/<p>[ \r\n]+/g, "<p>")
.replace(/[ \r\n]+<\/p>/g, "</p>")
.replace(/<(?:b|strong)>\s*/g, "<strong>")
.replace(/\s*<\/(?:b|strong)>/g, "</strong>")
.replace(/(<\/strong>)(\w)/g, "$1 $2")
// .replace(/\bpf2-icon\b/g, "action-glyph")
.replace(/<p> *<\/p>/g, "")
.replace(/<div> *<\/div>/g, "")
.replace(/&nbsp;/g, " ")
.replace(/\u2011/g, "-")
.replace(/\u2013/g, "&ndash;")
.replace(/\s*\u2014\s*/g, "&mdash;")
.replace(/ {2,}/g, " ")
.trim()
.replace(/^<hr \/>/, "")
.trim()
);
return container.innerHTML
.replace(/<([hb]r)>/g, "<$1 />") // Prefer self-closing tags
.replace(/<\/p> ?<p>/g, "</p>\n<p>")
.replace(/<p>[ \r\n]+/g, "<p>")
.replace(/[ \r\n]+<\/p>/g, "</p>")
.replace(/<(?:b|strong)>\s*/g, "<strong>")
.replace(/\s*<\/(?:b|strong)>/g, "</strong>")
.replace(/(<\/strong>)(\w)/g, "$1 $2")
.replace(/\bpf2-icon\b/g, "action-glyph")
.replace(/<p> *<\/p>/g, "")
.replace(/<div> *<\/div>/g, "")
.replace(/&nbsp;/g, " ")
.replace(/\u2011/g, "-")
.replace(/\s*\u2014\s*/g, "\u2014") // em dash
.replace(/ {2,}/g, " ")
.trim()
.replace(/^<hr \/>/, "")
.trim();
};

if ("system" in docSource) {
Expand Down
4 changes: 2 additions & 2 deletions packs/abomination-vaults-bestiary/barcumbuk.json
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@
"die": "d8"
},
"description": {
"value": "<p>This weapon has a wooden shaft ending in a large, heavy metal head. The head of the hammer might be singlesided or doublesided, but it's always capable of delivering powerful bludgeoning blows.</p>"
"value": "<p>This weapon has a wooden shaft ending in a large, heavy metal head. The head of the hammer might be single-sided or double-sided, but it's always capable of delivering powerful bludgeoning blows.</p>"
},
"equipped": {
"carryType": "held",
Expand Down Expand Up @@ -1364,7 +1364,7 @@
"checkPenalty": -2,
"containerId": null,
"description": {
"value": "<p>Though referred to as a breastplate, this type of armor consists of several pieces of plate or halfplate armor that protect the torso, chest, neck, and sometimes the hips and lower legs. It strategically grants some of the protection of plate while allowing greater flexibility and speed.</p>"
"value": "<p>Though referred to as a breastplate, this type of armor consists of several pieces of plate or half-plate armor that protect the torso, chest, neck, and sometimes the hips and lower legs. It strategically grants some of the protection of plate while allowing greater flexibility and speed.</p>"
},
"dexCap": 1,
"equipped": {
Expand Down
2 changes: 1 addition & 1 deletion packs/abomination-vaults-bestiary/beluthus.json
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@
}
},
"description": {
"value": "<p>You channel negative energy to harm the living or heal the undead. If the target is a living creature, you deal 1d8 negative damage to it, and it gets a basic Fortitude save. If the target is a willing undead creature, you restore that amount of Hit Points. The number of actions you spend when Casting this Spell determines its targets, range, area, and other parameters.</p>\n<p><span class=\"pf2-icon\">1</span> <strong>(somatic)</strong> The spell has a range of touch.</p>\n<p><span class=\"pf2-icon\">2</span> <strong>(verbal, somatic)</strong> The spell has a range of 30 feet. If you're healing an undead creature, increase the Hit Points restored by 8.</p>\n<p><span class=\"pf2-icon\">3</span> <strong>(material, verbal, somatic)</strong> You disperse negative energy in a 30-foot emanation. This targets all living and undead creatures in the area.</p>\n<hr />\n<p><strong>Heightened (+1)</strong> The amount of healing or damage increases by 1d8, and the extra healing for the 2-action version increases by 8.</p>"
"value": "<p>You channel negative energy to harm the living or heal the undead. If the target is a living creature, you deal 1d8 negative damage to it, and it gets a basic Fortitude save. If the target is a willing undead creature, you restore that amount of Hit Points. The number of actions you spend when Casting this Spell determines its targets, range, area, and other parameters.</p>\n<p><span class=\"action-glyph\">1</span> <strong>(somatic)</strong> The spell has a range of touch.</p>\n<p><span class=\"action-glyph\">2</span> <strong>(verbal, somatic)</strong> The spell has a range of 30 feet. If you're healing an undead creature, increase the Hit Points restored by 8.</p>\n<p><span class=\"action-glyph\">3</span> <strong>(material, verbal, somatic)</strong> You disperse negative energy in a 30-foot emanation. This targets all living and undead creatures in the area.</p>\n<hr />\n<p><strong>Heightened (+1)</strong> The amount of healing or damage increases by 1d8, and the extra healing for the 2-action version increases by 8.</p>"
},
"duration": {
"value": ""
Expand Down
2 changes: 1 addition & 1 deletion packs/abomination-vaults-bestiary/blast-tumbler.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"category": null,
"description": {
"value": "<p><strong>Trigger</strong> A nonundead creature opens the door or critically fails an attempt to disarm or dispel the rune</p>\n<hr />\n<p><strong>Effect</strong> A 30foot cone of force issues forth from the lock. Creatures within the cone must succeed a @Check[type:fortitude|dc:29|basic:true] saving throw or take @Damage[8d12[force]] damage. Those who fail the save are pushed 10 feet, and those who critically fail are pushed 20 feet and are @UUID[Compendium.pf2e.conditionitems.Item.Stunned]{Stunned 2}.</p>"
"value": "<p><strong>Trigger</strong> A non-undead creature opens the door or critically fails an attempt to disarm or dispel the rune</p>\n<hr />\n<p><strong>Effect</strong> A 30-foot cone of force issues forth from the lock. Creatures within the cone must succeed a @Check[type:fortitude|dc:29|basic:true] saving throw or take @Damage[8d12[force]] damage. Those who fail the save are pushed 10 feet, and those who critically fail are pushed 20 feet and are @UUID[Compendium.pf2e.conditionitems.Item.Stunned]{Stunned 2}.</p>"
},
"requirements": {
"value": ""
Expand Down
2 changes: 1 addition & 1 deletion packs/abomination-vaults-bestiary/boss-skrawng.json
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@
"die": "d8"
},
"description": {
"value": "<p>This threepronged, spearlike weapon typically has a 4foot shaft. Like a spear, it can be wielded with one hand or thrown.</p>"
"value": "<p>This three-pronged, spear-like weapon typically has a 4-foot shaft. Like a spear, it can be wielded with one hand or thrown.</p>"
},
"equipped": {
"carryType": "held",
Expand Down
2 changes: 1 addition & 1 deletion packs/abomination-vaults-bestiary/caliddo-haruvex.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"die": "d12"
},
"description": {
"value": "<p>This immense twohanded sword is nearly as tall as its wielder. Its lower blade is often somewhat dulled to allow it to be gripped for extra leverage in closequarter fights.</p>"
"value": "<p>This immense two-handed sword is nearly as tall as its wielder. Its lower blade is often somewhat dulled to allow it to be gripped for extra leverage in close-quarter fights.</p>"
},
"equipped": {
"carryType": "held",
Expand Down
2 changes: 1 addition & 1 deletion packs/abomination-vaults-bestiary/caligni-defender.json
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@
},
"containerId": null,
"description": {
"value": "<p>Many calignis use a debilitating poison crafted from subterranean fungi.</p>\n<hr />\n<p><strong>Activate</strong> <span class=\"pf2-icon\">T</span> Interact (Injury)</p>\n<p><strong>Saving Throw</strong> DC 16 Fortitude</p>\n<p><strong>Maximum Duration</strong> 6 rounds</p>\n<p><strong>Stage 1</strong> @Damage[1d6[poison]] damage and @UUID[Compendium.pf2e.conditionitems.Item.Enfeebled]{Enfeebled 1} (1 round)</p>\n<p><strong>Stage 2</strong> As stage 1</p>\n<p><strong>Stage 3</strong> @Damage[1d6[poison]] damage, and @UUID[Compendium.pf2e.conditionitems.Item.Enfeebled]{Enfeebled 2} (1 round)</p>"
"value": "<p>Many calignis use a debilitating poison crafted from subterranean fungi.</p>\n<hr />\n<p><strong>Activate</strong> <span class=\"action-glyph\">T</span> Interact (Injury)</p>\n<p><strong>Saving Throw</strong> DC 16 Fortitude</p>\n<p><strong>Maximum Duration</strong> 6 rounds</p>\n<p><strong>Stage 1</strong> @Damage[1d6[poison]] damage and @UUID[Compendium.pf2e.conditionitems.Item.Enfeebled]{Enfeebled 1} (1 round)</p>\n<p><strong>Stage 2</strong> As stage 1</p>\n<p><strong>Stage 3</strong> @Damage[1d6[poison]] damage, and @UUID[Compendium.pf2e.conditionitems.Item.Enfeebled]{Enfeebled 2} (1 round)</p>"
},
"equipped": {
"carryType": "worn",
Expand Down
2 changes: 1 addition & 1 deletion packs/abomination-vaults-bestiary/canker-cultist.json
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@
}
},
"description": {
"value": "<p>You channel negative energy to harm the living or heal the undead. If the target is a living creature, you deal 1d8 negative damage to it, and it gets a basic Fortitude save. If the target is a willing undead creature, you restore that amount of Hit Points. The number of actions you spend when Casting this Spell determines its targets, range, area, and other parameters.</p>\n<p><span class=\"pf2-icon\">1</span> <strong>(somatic)</strong> The spell has a range of touch.</p>\n<p><span class=\"pf2-icon\">2</span> <strong>(verbal, somatic)</strong> The spell has a range of 30 feet. If you're healing an undead creature, increase the Hit Points restored by 8.</p>\n<p><span class=\"pf2-icon\">3</span> <strong>(material, verbal, somatic)</strong> You disperse negative energy in a 30-foot emanation. This targets all living and undead creatures in the area.</p>\n<hr />\n<p><strong>Heightened (+1)</strong> The amount of healing or damage increases by 1d8, and the extra healing for the 2-action version increases by 8.</p>"
"value": "<p>You channel negative energy to harm the living or heal the undead. If the target is a living creature, you deal 1d8 negative damage to it, and it gets a basic Fortitude save. If the target is a willing undead creature, you restore that amount of Hit Points. The number of actions you spend when Casting this Spell determines its targets, range, area, and other parameters.</p>\n<p><span class=\"action-glyph\">1</span> <strong>(somatic)</strong> The spell has a range of touch.</p>\n<p><span class=\"action-glyph\">2</span> <strong>(verbal, somatic)</strong> The spell has a range of 30 feet. If you're healing an undead creature, increase the Hit Points restored by 8.</p>\n<p><span class=\"action-glyph\">3</span> <strong>(material, verbal, somatic)</strong> You disperse negative energy in a 30-foot emanation. This targets all living and undead creatures in the area.</p>\n<hr />\n<p><strong>Heightened (+1)</strong> The amount of healing or damage increases by 1d8, and the extra healing for the 2-action version increases by 8.</p>"
},
"duration": {
"value": ""
Expand Down
2 changes: 1 addition & 1 deletion packs/abomination-vaults-bestiary/child-of-belcorra.json
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
},
"category": "offensive",
"description": {
"value": "<p>This affliction can't be reduced below stage 1, nor can the damage from it be healed, until it's successfully treated with <em>@UUID[Compendium.pf2e.spells-srd.Item.Remove Curse]</em> or a similar effect; the affliction can then be removed as normal for a disease. A creature killed by bog rot melts into a noxious sludge and can't be resurrected except by a 7thlevel <em>@UUID[Compendium.pf2e.spells-srd.Item.Resurrect]</em> ritual or similar magic</p>\n<hr />\n<p><strong>Saving Throw</strong> @Check[type:fortitude|dc:21]</p>\n<hr />\n<p><strong>Stage 1</strong> carrier with no ill effect (1 minute)</p>\n<p><strong>Stage 2</strong> @Damage[3d6[void]] damage and @UUID[Compendium.pf2e.conditionitems.Item.Clumsy]{Clumsy 1} (1 day)</p>"
"value": "<p>This affliction can't be reduced below stage 1, nor can the damage from it be healed, until it's successfully treated with <em>@UUID[Compendium.pf2e.spells-srd.Item.Remove Curse]</em> or a similar effect; the affliction can then be removed as normal for a disease. A creature killed by bog rot melts into a noxious sludge and can't be resurrected except by a 7th-level <em>@UUID[Compendium.pf2e.spells-srd.Item.Resurrect]</em> ritual or similar magic</p>\n<hr />\n<p><strong>Saving Throw</strong> @Check[type:fortitude|dc:21]</p>\n<hr />\n<p><strong>Stage 1</strong> carrier with no ill effect (1 minute)</p>\n<p><strong>Stage 2</strong> @Damage[3d6[void]] damage and @UUID[Compendium.pf2e.conditionitems.Item.Clumsy]{Clumsy 1} (1 day)</p>"
},
"requirements": {
"value": ""
Expand Down
2 changes: 1 addition & 1 deletion packs/abomination-vaults-bestiary/daemonic-fog.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"category": null,
"description": {
"value": "<p><strong>Trigger</strong> A creature crosses the cavern's midpoint (the dotted line on the map)</p>\n<hr />\n<p><strong>Effect</strong> The hazard deals @Damage[9d6[piercing]] damage (@Check[type:reflex|dc:32|basic:true] save) to the triggering creature and all other nonfiend creatures within 20 feet. A creature that critically fails the saving throw is confused for [[/br 1d4 #rounds]]{1d4 rounds}.</p>"
"value": "<p><strong>Trigger</strong> A creature crosses the cavern's midpoint (the dotted line on the map)</p>\n<hr />\n<p><strong>Effect</strong> The hazard deals @Damage[9d6[piercing]] damage (@Check[type:reflex|dc:32|basic:true] save) to the triggering creature and all other non-fiend creatures within 20 feet. A creature that critically fails the saving throw is confused for [[/br 1d4 #rounds]]{1d4 rounds}.</p>"
},
"requirements": {
"value": ""
Expand Down
4 changes: 2 additions & 2 deletions packs/abomination-vaults-bestiary/drill-field-barbazu.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@
"die": "d8"
},
"description": {
"value": "<p>This polearm consists of a long, singleedged blade on the end of a 7foot pole. It is extremely effective at delivering lethal cuts at a distance.</p>"
"value": "<p>This polearm consists of a long, single-edged blade on the end of a 7-foot pole. It is extremely effective at delivering lethal cuts at a distance.</p>"
},
"equipped": {
"carryType": "held",
Expand Down Expand Up @@ -536,7 +536,7 @@
"baseItem": null,
"containerId": null,
"description": {
"value": "<p>This black leather wrist guard has a bright red gem on the inside of the wrist. Faint glyphs and words of domination in Infernal swim inside the gem. Your words become harsh and clipped when you have this magic item invested.</p>\n<hr />\n<p><strong>Activate</strong> <span class=\"pf2-icon\">3</span> command</p>\n<p><strong>Frequency</strong> once per day</p>\n<hr />\n<p><strong>Effect</strong> You exert your will over a mindless creature within 30 feet. If the target is a mindless creature of 3rd level or lower, it must attempt a @Check[type:will|dc:20] save. If you are a devil, the target uses an outcome one degree of success worse than the result of its saving throw.</p>\n<hr />\n<p><strong>Critical Success</strong> The target creature is unaffected.</p>\n<p><strong>Success</strong> The target creature is @UUID[Compendium.pf2e.conditionitems.Item.Slowed]{Slowed 1} for 1 round as its responses are muddled by your commands.</p>\n<p><strong>Failure</strong> The creature is @UUID[Compendium.pf2e.conditionitems.Item.Controlled] by you for 1 hour, although it doesn't follow commands that are obviously self-destructive.</p>\n<p><strong>Critical Failure</strong> As failure, but the duration is 1 day.</p>"
"value": "<p>This black leather wrist guard has a bright red gem on the inside of the wrist. Faint glyphs and words of domination in Infernal swim inside the gem. Your words become harsh and clipped when you have this magic item invested.</p>\n<hr />\n<p><strong>Activate</strong> <span class=\"action-glyph\">3</span> command</p>\n<p><strong>Frequency</strong> once per day</p>\n<hr />\n<p><strong>Effect</strong> You exert your will over a mindless creature within 30 feet. If the target is a mindless creature of 3rd level or lower, it must attempt a @Check[type:will|dc:20] save. If you are a devil, the target uses an outcome one degree of success worse than the result of its saving throw.</p>\n<hr />\n<p><strong>Critical Success</strong> The target creature is unaffected.</p>\n<p><strong>Success</strong> The target creature is @UUID[Compendium.pf2e.conditionitems.Item.Slowed]{Slowed 1} for 1 round as its responses are muddled by your commands.</p>\n<p><strong>Failure</strong> The creature is @UUID[Compendium.pf2e.conditionitems.Item.Controlled] by you for 1 hour, although it doesn't follow commands that are obviously self-destructive.</p>\n<p><strong>Critical Failure</strong> As failure, but the duration is 1 day.</p>"
},
"equipped": {
"carryType": "worn",
Expand Down
2 changes: 1 addition & 1 deletion packs/abomination-vaults-bestiary/drow-hunter.json
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@
"die": "d8"
},
"description": {
"value": "<p>Longswords can be oneedged or twoedged swords. Their blades are heavy and they're between 3 and 4 feet in length.</p>"
"value": "<p>Longswords can be one-edged or two-edged swords. Their blades are heavy and they're between 3 and 4 feet in length.</p>"
},
"equipped": {
"carryType": "held",
Expand Down
Loading

0 comments on commit 58ba6b1

Please sign in to comment.