소스 검색

Truncate lede at question mark

This fixes TestPostLede and closes #316.
pull/381/head
Matt Baer 3 년 전
부모
커밋
98d88b9a4b
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. +6
    -1
      parse/posts.go

+ 6
- 1
parse/posts.go 파일 보기

@@ -1,5 +1,5 @@
/*
* Copyright © 2018 A Bunch Tell LLC.
* Copyright © 2018-2020 A Bunch Tell LLC.
*
* This file is part of WriteFreely.
*
@@ -57,6 +57,11 @@ func PostLede(t string, includePunc bool) string {
c := []rune(t)
t = string(c[:punc+iAdj])
}
punc = stringmanip.IndexRune(t, '?')
if punc > -1 {
c := []rune(t)
t = string(c[:punc+iAdj])
}

return t
}


불러오는 중...
취소
저장