korlibs / korlibs/korlibs-template

[KorTE]: Add replace filter

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Kotlin
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

See https://github.com/korlibs/korge/issues/955

Expected usage:

```
{{ variable | replace("\n", "
") }}
```

Filter should should be implemented here:
* https://github.com/korlibs/korge/blob/09c5f9cb5a6e0ea756b052afd661b365c07c48c1/korte/src/commonMain/kotlin/com/soywiz/korte/DefaultFilters.kt
* https://github.com/korlibs/korge/blob/09c5f9cb5a6e0ea756b052afd661b365c07c48c1/korte/src/commonTest/kotlin/com/soywiz/korte/TemplateTest.kt#L255

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in korte/src/commonMain/kotlin/com/soywiz/korte/DefaultFilters.kt, then review the relevant cases in korte/src/commonTest/kotlin/com/soywiz/korte/TemplateTest.kt around line 255. Implement the replace filter for the shown template usage and add or update a test demonstrating that newline characters become the requested replacement text.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.