Skip to content

Commit

Permalink
Fix bug and spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
IanCa committed Nov 30, 2023
1 parent 3633396 commit 3e2770c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hed/models/hed_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def get_stripped_unit_value(self, extension_text):
""" Return the extension divided into value and units, if the units are valid.
Parameters:
extension_text (str): The text to split, incase it's a portion of a tag.
extension_text (str): The text to split, in case it's a portion of a tag.
Returns:
stripped_unit_value (str): The extension portion with the units removed.
Expand Down
3 changes: 3 additions & 0 deletions hed/validator/def_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ def validate_def_value_units(self, def_tag, hed_validator):
def_contents = def_entry.get_definition(def_tag, placeholder_value=placeholder, return_copy_of_tag=True)
if def_contents and def_entry.takes_value and hed_validator:
placeholder_tag = def_contents.get_first_group().find_placeholder_tag()
# Handle the case where they're adding a unit as part of a placeholder. eg Speed/# mph
if placeholder_tag:
placeholder = placeholder_tag.extension
def_issues += hed_validator.validate_units(placeholder_tag,
placeholder,
report_as=def_tag,
Expand Down

0 comments on commit 3e2770c

Please sign in to comment.