New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MBS-4091: Avoid breaking lists while trimming annotations #1160
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Alternatively, we might want to assume too much spacing is always an error and trim it unless it's exactly 4 spaces or one tab. |
mwiencek
reviewed
Nov 15, 2019
From annotation formatting: Lists: tab or 4 spaces and: * bullets or 1., a., A., i., I. numbered items (rendered with 1.) We are trimming all whitespace at the start and end of the annotation though (FormHandler's default), meaning if the annotation starts with a list the formatting for the first element will be broken. This overrides the default trim method with one that only trims the ending, to avoid this situation.
Changed to trim ending whitespace only. |
mwiencek
approved these changes
Nov 20, 2019
yvanzo
approved these changes
Nov 20, 2019
mwiencek
added a commit
that referenced
this pull request
Dec 5, 2019
* master: Update translations from transifex. Update pot files using current code and production database. MBS-10304: Reallow special codes as editor language (#1190) MBS-10493: Better sizing for edit search selects (#1289) Properly set $collection->subscribed Show if subscribed to other editor collections Fix issues relating to eslint rule no-negated-condition (#1300) Bump Flow to 0.113.0 Eliminate unused variables (#1295) MBS-10248: Show relationship types in instrument lists (#1134) MBS-10255: Explanations for "copy all" checkboxes (#1147) REFACTOR: Enforce eslint curly brace convention (#1296) Add basic Flow types for react-table Replace component naming convention MBS-10439: Convert user collections list to React Fix JS to follow the no-cond-assign eslint rule (#1294) Eliminate warnings caused by eslint rule react/jsx-handler-names (#1292) MBS-10422: Add ISRCs to release editor recording search (#1288) MBS-10489: Make EnterEditNote text less redundant (#1285) Use MediumDescription for positionName in relationship editor Convert Entity::Medium::has_multiple_artists to JS Convert medium_link to React Remove unnecessary spans from MediumDescription Convert medium_description to React MBS-10479: Show RG types on recording page (#1275) MBS-10502: Map 45cat/45worlds records with MB RGs (#1299) Adding flow/require-indexer-name to eslintrc (#1267) MBS-10468: Stop breaking Bandcamp merch links (#1276) Convert medium_format_name to React Add Flow types to isolateText Tweak medium format format MBS-10350: Stop highlighting Google+ links (#1282) Separate merge error for missing target mediums REFACTOR: Convert var or let to const (#1293) Reject recording merge cycles (MBS-10188) Calculate bad_recording_merges in _validate_merge Use _validate_merge instead of _merge_submit Add error for ambiguous recording merge target Localize ModBot release merge errors Change can_merge signature Use more specific var name Put release merge errors in hash MBS-10500: Allow localizing ModBot edit notes Remove unnecessary can_merge call Fix release-recording merge display (MBS-10279) Add missing semicolon Remove unused stash variable Move RecordingMergesArray type to Edit::Types More languages in t/sql/initial.sql MBS-10491: Add "Add instrument" to search results (#1287) MBS-10495: Update Discourse API authentication method (#1290) Skip release_coverart in dump-entities-sql More dump-entities-sql options Allow dumping edits from dump-entities-sql Dump edit_data and vote too Fix edit table dump order in dump-entities-sql Allow configuring the dump-entities-sql database MBS-10482: Block and skip cleaning Patreon posts (#1281) MBS-4776: Require confirmation for VA track artist (#1214) MBS-4091: Avoid breaking lists while trimming (#1160) MBS-10228: Show releases w/o media in append-merge MBS-10244: Show [missing media] on release merge MBS-10243: Show [missing media] on duplicates tab Make '-' localizable
yvanzo
added a commit
that referenced
this pull request
Dec 9, 2019
* beta: Update translations from transifex. MBS-10512: Do not show [missing media] for deleted/merged releases (#1308) MBS-10511: Regression: Modbot edit references are no longer linkified (#1317) Update translations from transifex. Update pot files using current code and production database. MBS-10304: Reallow special codes as editor language (#1190) MBS-10493: Better sizing for edit search selects (#1289) Properly set $collection->subscribed Show if subscribed to other editor collections Fix issues relating to eslint rule no-negated-condition (#1300) Bump Flow to 0.113.0 Eliminate unused variables (#1295) MBS-10248: Show relationship types in instrument lists (#1134) MBS-10255: Explanations for "copy all" checkboxes (#1147) REFACTOR: Enforce eslint curly brace convention (#1296) Add basic Flow types for react-table Replace component naming convention MBS-10439: Convert user collections list to React Fix JS to follow the no-cond-assign eslint rule (#1294) Eliminate warnings caused by eslint rule react/jsx-handler-names (#1292) MBS-10422: Add ISRCs to release editor recording search (#1288) MBS-10489: Make EnterEditNote text less redundant (#1285) Use MediumDescription for positionName in relationship editor Convert Entity::Medium::has_multiple_artists to JS Convert medium_link to React Remove unnecessary spans from MediumDescription Convert medium_description to React MBS-10479: Show RG types on recording page (#1275) MBS-10502: Map 45cat/45worlds records with MB RGs (#1299) Adding flow/require-indexer-name to eslintrc (#1267) MBS-10468: Stop breaking Bandcamp merch links (#1276) Convert medium_format_name to React Add Flow types to isolateText Tweak medium format format MBS-10350: Stop highlighting Google+ links (#1282) Separate merge error for missing target mediums REFACTOR: Convert var or let to const (#1293) Reject recording merge cycles (MBS-10188) Calculate bad_recording_merges in _validate_merge Use _validate_merge instead of _merge_submit Add error for ambiguous recording merge target Localize ModBot release merge errors Change can_merge signature Use more specific var name Put release merge errors in hash MBS-10500: Allow localizing ModBot edit notes Remove unnecessary can_merge call Fix release-recording merge display (MBS-10279) Add missing semicolon Remove unused stash variable Move RecordingMergesArray type to Edit::Types More languages in t/sql/initial.sql MBS-10491: Add "Add instrument" to search results (#1287) MBS-10495: Update Discourse API authentication method (#1290) Skip release_coverart in dump-entities-sql More dump-entities-sql options Allow dumping edits from dump-entities-sql Dump edit_data and vote too Fix edit table dump order in dump-entities-sql Allow configuring the dump-entities-sql database Update translations from transifex. MBS-10490: Fix broken "last 24h" edit search link (#1286) MBS-10485: Remove /all from /edits/all link MBS-10488: Fix profile subscription links MBS-10482: Block and skip cleaning Patreon posts (#1281) MBS-4776: Require confirmation for VA track artist (#1214) MBS-4091: Avoid breaking lists while trimming (#1160) Update pot files using current code and production database. Update translations from transifex. Create tags from query rather than loading later MBS-9491: Remove hardcoded genre list MBS-9491: Load genre data with tags Remove unused variable MBS-7097: Avoid listing releases multiple times (#1140) MBS-10471: Add option to view edits by date closed Remove MetaDescription i18n Factor out getLanguageName Remove onChange=noop from uncontrolled components Fix controlled FormRowText usage Bump Flow to 0.112.0 Add Flow types to layout/index Add Flow types to MergeHelper Add Flow types to layout Head Add Flow types to MetaDescription MBS-10228: Show releases w/o media in append-merge MBS-10244: Show [missing media] on release merge MBS-10243: Show [missing media] on duplicates tab Make '-' localizable Remove unused selector section MBS-4299: Show expanded AC in merge release warning (#1162) Update pot files using current code and production database. Update translations from transifex. Organize and make consistent refine_url_args args MBS-10204: Sum applied edits in stats Use uppercase (C) for consistency Change to newer copyright blurb Eslint fixes for multiline-comment-style MBS-9922: Convert the series index page to React (#1257) Add new eslint:recommended rules to eslintrc Add enforceForClassMembers to computed-property-spacing Update musicbrainz-tests image on CircleCI Bump nodejs to 10.17.0 Add import plugin to check_eslint_rule Update eslint package versions MBS-10473: Make terser-webpack-plugin a full dependency (#1265) Add typeInfo.js to eslintignore (#1264) MBS-10467: whitelist new_edit_notes_mtime stash key (#1263) Always enable react/jsx-uses* in check_eslint_rule Update translations from transifex. MBS-10465: Handle legacy tzs in formatUserDate (#1259) Coding style: reorder conditions and fix indent MBS-10466: Wish a happy birthday in user timezone Update pot files using current code and production database. Remove pot-creation-date from xgettext pot files Update translations from transifex. MBS-10299: Add page with suggested edit searches (#1173) Move FLUENCY_NAMES to be a reusable constant MBS-10206: Convert user profile to React MBS-10361: Move edit note help for better tabbing (#1209) Replace intersection of exact objects with spread Bump Flow to 0.111.3 Remove moment, use Intl.DateTimeFormat Change array-bracket-newline to consistent Remove unused jsx-control-statements [ignore] Ignore nyc/istanbul dirs in .flowconfig MBS-10460: Store "ended" in remove alias edits MBS-10448: Add Dynamic Range DB to otherdbs whitelist (#1247) MBS-3839: Allow removing from queue during merge MBS-10456: Show more info when entering artist merges Add missing key to map Move ReportUser help to use help prop Change new artist -> target artist MBS-10382: Explain when to use the Update checkbox MBS-10371: Update the Songfacts logo (#1254) MBS-10389: Add “IRC” link to footer (#1253) Add a script to check a specific eslint rule (#1251) Add markers for flow comments to spaced-comment Eslint fixes for space-unary-ops Eslint fixes for space-in-parens Eslint fixes for space-before-function-paren Eslint fix for space-before-blocks Eslint fixes for no-multi-spaces Eslint fixes for no-trailing-spaces MBS-10394 Convert Add/Remove Alias edit to React and MBS-10395 Convert Edit Alias edit to React max-len fixes for root/statistics/Index.js Readability improvements to CDStubSidebar query Eslint max-len fixes for TagEditor Eslint max-len fixes Apply eslint max-len to strings JavaScript test coverage for Selenium Add Flow syntax to spaced-comment exceptions Add @flow strict to more files Standardise "Remove Entity" titles MBS-10440: Remove series/delete MBS-10403: Better message for entity removal pages MBS-10447: Error if data missing in historical remove rel edit MBS-10446: Fix historic "remove relationship" display Get po/Makefile prereqs with git-ls-files
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://tickets.metabrainz.org/browse/MBS-4091
From annotation formatting:
Lists: tab or 4 spaces and:
We are trimming all whitespace at the start and end of the annotation though (FormHandler's default), meaning if the annotation starts with a list the formatting for the first element will be broken. This overrides the default trim method with one that will leave one tab or four spaces if there's that or more than that at the start of the annotation.