Skip to content

Commit

Permalink
Strip "/r" from descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
ben committed Mar 6, 2024
1 parent 25d72d3 commit 75d1a0b
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 64 deletions.
2 changes: 1 addition & 1 deletion import-from-archmage-yaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const debug = require('debug')('import')

function stripFoundryMarkup (input?: string): string {
return (input ?? '')
.replace(/\[\[(d20)?/g, '') // Remove [[d20 and [[
.replace(/\[\[(d20)?(\/r(oll)?\s+)?/g, '') // Remove [[ and [[d20 and [[/r and [[/roll
.replace(/\]\]/g, '') // Remove ]]
.replace(/\+\s*(\d+)/g, '+$1') // convert "+ 1" to "+1"
.replace(/\*(\w+)\*/g, '$1') // convert *word* to word
Expand Down
Loading

0 comments on commit 75d1a0b

Please sign in to comment.