cafe_basics_duo 0.0.71 → 0.0.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cafe_basics_duo.rb +12 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4792dd67ffd53f8c9db8206192616d01197814bfddcadbc00f77f6a054362e7f
4
- data.tar.gz: 3dbe55200bf681dcfb75daf1998dfae19e692ef3513aca06c0c6b017f7889ffd
3
+ metadata.gz: e51bcfd1cd8cd92bf7683f554d7333e6d4b7118d2d90028d6200d5fde85b8a1c
4
+ data.tar.gz: 6fbfc64564bdd5073db66d0e842a285ba68bedbffece76377662832b45559e87
5
5
  SHA512:
6
- metadata.gz: b8379bf6bdc335a6b61fb4f3ca464ca91350b633b8413c803a028ed00d0ec1435f3ff2ee43cf59b11a431c7d56b703a917c83084a8cbf8e13931d75f19c784f4
7
- data.tar.gz: e732ba52abc727d2ae77d90b715af28ed68a291928e51b422330a120f1d70705a3f80b4d67405fa38b1ce9cbaf79ecae9000946fd1361bfb1ec7dc30cdcdd56b
6
+ metadata.gz: 4361d64c4d19e18f955ac5b7b8d12de872ddbf7c1c525e47ab28765c794ca65b99b2c05de8d4180fc3eb8eb99a44c4698745f85da41a734b5da60140a1960c83
7
+ data.tar.gz: baf710622d92af9fe1426700a1f23ae74bdf67fd003e627552eef20738b492b11f5440cade100fd0af7c0a521d4d018d69deb09fad5aedf6bc1570d003701577
@@ -3280,9 +3280,19 @@ class Wordpress
3280
3280
  end
3281
3281
 
3282
3282
 
3283
+ #if @data['포스트설정']['내용첫줄제목에입력'].checked?
3284
+ # title = content.split("\n")[0]
3285
+ #end
3283
3286
  if @data['포스트설정']['내용첫줄제목에입력'].checked?
3284
- title = content.split("\n")[0]
3285
-
3287
+ # 콘텐츠를 단위로 분리
3288
+ content_lines = content.split("\n")
3289
+
3290
+ # 첫 번째 줄이 <img src=로 시작하는지 확인하고, 시작하는 경우 두 번째 줄부터 확인
3291
+ title = content_lines.find { |line| !line.start_with?('<img src=') }
3292
+
3293
+ # 만약 첫 번째 줄부터 <img src=로 시작하는 경우, 두 번째 줄을 제목으로 설정
3294
+ title ||= content_lines[1] # 첫 번째 줄이 <img src=일 경우 두 번째 줄을 사용
3295
+
3286
3296
  end
3287
3297
 
3288
3298
  if @data['포스트설정']['제목을내용첫줄입력'].checked?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cafe_basics_duo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.71
4
+ version: 0.0.72
5
5
  platform: ruby
6
6
  authors:
7
7
  - zon