Skip to content

feature: prevent duplicate punctuation on paragraph ending - #78

Merged
naluthfi merged 2 commits into
masterfrom
feature/TEC-1085
May 13, 2026
Merged

feature: prevent duplicate punctuation on paragraph ending#78
naluthfi merged 2 commits into
masterfrom
feature/TEC-1085

Conversation

@naluthfi

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread slate_converter.go Outdated
Comment on lines +152 to +156
trimmed := strings.TrimRight(text, " ")
if !endsWithPunctuation(trimmed) {
lastSlateLeaf.Text = trimmed + _sentenceSeparator
} else {
lastSlateLeaf.Text = trimmed

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bisa dibuat func aja mba biar reusable

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kalo dibikin gini giman
lastslateLeaf.Text := strings.TrimRight(text, " ")
if !endsWithPunctuation(trimmed) {
lastSlateLeaf.Text = lastslateLeaf.Text + _sentenceSeparator
}

@naluthfi
naluthfi force-pushed the feature/TEC-1085 branch from 9f15bb9 to eca47f7 Compare May 13, 2026 03:14
Comment thread go.mod Outdated
module github.com/kumparan/go-utils

go 1.26.0
go 1.26

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kenapa diganti mba?

@naluthfi
naluthfi force-pushed the feature/TEC-1085 branch from eca47f7 to e1b3468 Compare May 13, 2026 04:13
@naluthfi
naluthfi merged commit a72f4fb into master May 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants