code: def getVersion(data):
      
      data = data.splitlines()
      return next((
          v
          for v, u in zip(data, data[1:])  # v = version, u = underline
          if len(v) == len(u) and allSame(u) and hasDigit(v) and "." in v
      ))
docs: Parse version from changelog written in RST format.