Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/149646
Change subject: ve.ui.AnnotationInspector: Stop truncating fragments to 255 elements ...................................................................... ve.ui.AnnotationInspector: Stop truncating fragments to 255 elements This was implemented for the link inspector in 2012, in Ibddf942c, as a temporary hack, and has survived at least three total rewrites of everything. Even for the link inspector, this makes no sense: * We don't even know if we're truncating characters or other nodes. * We don't even know if we're making an internal or external link. * We don't even know if the fragment will be a valid title. * And we don't even know if a valid title needs to be shorter than 255 bytes anyway. Change-Id: I0c005cb77045b1926aa98616b9a02da7aa6fb061 --- M modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/46/149646/1 diff --git a/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js b/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js index 9b507b8..2887cf2 100644 --- a/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js +++ b/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js @@ -147,7 +147,7 @@ ve.ui.AnnotationInspector.prototype.getSetupProcess = function ( data ) { return ve.ui.AnnotationInspector.super.prototype.getSetupProcess.call( this, data ) .next( function () { - var expandedFragment, trimmedFragment, truncatedFragment, initialCoveringAnnotation, + var expandedFragment, trimmedFragment, initialCoveringAnnotation, fragment = this.getFragment(), annotation = this.getMatchingAnnotations( fragment, true ).get( 0 ); @@ -169,8 +169,6 @@ } if ( !fragment.getRange().isCollapsed() ) { // Create annotation from selection - truncatedFragment = fragment.truncateRange( 255 ); - fragment = truncatedFragment; annotation = this.getAnnotationFromFragment( fragment ); if ( annotation ) { fragment.annotateContent( 'set', annotation ); -- To view, visit https://gerrit.wikimedia.org/r/149646 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0c005cb77045b1926aa98616b9a02da7aa6fb061 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński <matma....@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits