Skip to content

Commit f906b6f

Browse files
committed
Adjusting column match regexp to match markdown template
1 parent 91033bb commit f906b6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/annotate/annotate_models.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def annotate_one_file(file_name, info_block, position, options={})
222222
old_header = old_content.match(header_pattern).to_s
223223
new_header = info_block.match(header_pattern).to_s
224224

225-
column_pattern = /^#[\t ]+\w+[\t ]+.+$/
225+
column_pattern = /^#[\t ]+[\w\*`]+[\t ]+.+$/
226226
old_columns = old_header && old_header.scan(column_pattern).sort
227227
new_columns = new_header && new_header.scan(column_pattern).sort
228228

@@ -235,7 +235,7 @@ def annotate_one_file(file_name, info_block, position, options={})
235235
# Replace inline the old schema info with the new schema info
236236
new_content = old_content.sub(PATTERN, info_block + "\n")
237237

238-
if new_content.end_with? (info_block + "\n")
238+
if new_content.end_with?(info_block + "\n")
239239
new_content = old_content.sub(PATTERN, "\n" + info_block)
240240
end
241241

0 commit comments

Comments
 (0)