Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Fix potentially incorrect line numbers #1460

Merged
merged 4 commits into from
Dec 27, 2020
Merged

Conversation

whaught
Copy link
Contributor

@whaught whaught commented Dec 27, 2020

Fixes #1459

Proposed Changes

  • The code currently assumes each line is in-order and uses index to show line number. However we skip blank or empty lines of the file which results in off-by-one.
  • This fixes that by keeping an array of line numbers.
  • Also consolidates string calculation for the href download
Fix off-by-one line numbers for bulk uploader

@googlebot googlebot added the cla: yes Auto: added by CLA bot when all committers have signed a CLA. label Dec 27, 2020
@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sethvargo, whaught

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-robot google-oss-robot merged commit 43f19f4 into google:main Dec 27, 2020
@whaught whaught deleted the line-nums branch December 28, 2020 18:08
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Auto: added by CLA bot when all committers have signed a CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Batch upload may report incorrect lines
4 participants