Skip to content

Commit ecdb884

Browse files
committed
Match last bullet even if no trailing newline
1 parent 3980c4c commit ecdb884

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/bioschemas/generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def self.markdown_to_array(markdown)
111111
a = []
112112

113113
if markdown.start_with?(' * ')
114-
matches = markdown.scan(/ \* (.+)\n/)
114+
matches = markdown.scan(/ \* (.+)(?:\n|\z)/)
115115
if matches.any?
116116
a += matches.flatten
117117
else

test/fixtures/events.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ course_event:
479479
contact: MyContact
480480
eligibility: [ first_come_first_served ]
481481
timezone: UTC
482-
learning_objectives: " * Learn stuff\n * Get a job\n * Get paid\n"
482+
learning_objectives: " * Learn stuff\n * Get a job\n * Get paid"
483483
prerequisites: " * Sleep\n * Eat\n * Breathe\n"
484484
recognition: "Yup. You attended the workshop."
485485
target_audience: ['Everyone!']

0 commit comments

Comments
 (0)