Skip to content

Commit ba922d8

Browse files
committed
Add MergeSpecification property to remove associated styles
1 parent 9115c61 commit ba922d8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/kotlin/myaa/subkt/tasks/asstasks.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,12 @@ open class Merge : ASSTask() {
168168
@get:Input
169169
@get:Optional
170170
val syncTargetTime = project.objects.property<Duration>()
171+
172+
/**
173+
* Specifies whether to ignore all styles from associated files.
174+
*/
175+
@get:Input
176+
val removeStyles = defaultProperty(false)
171177
}
172178

173179
/**
@@ -346,6 +352,10 @@ open class Merge : ASSTask() {
346352
line.end += spec.shiftBy.get()
347353
}
348354

355+
if (spec.removeStyles.get()) {
356+
ass.styles.lines.clear()
357+
}
358+
349359
spec.syncTargetLine.orNull?.let {
350360
targetLineSpecs.add(it)
351361
}

0 commit comments

Comments
 (0)