diff --git a/CHANGELOG.md b/CHANGELOG.md
index 90aba0b..c0096b7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,8 @@
-# 1.8.2-dev
+# 1.8.2
 
-- Require Dart >= 2.14.
+* Fix a bug where highlighting multiple spans with `null` URLs could cause an
+  assertion error. Now when multiple spans are passed with `null` URLs, they're
+  highlighted as though they all come from different source files.
 
 # 1.8.1
 
diff --git a/lib/src/highlighter.dart b/lib/src/highlighter.dart
index 19d8965..d4e5ebf 100644
--- a/lib/src/highlighter.dart
+++ b/lib/src/highlighter.dart
@@ -126,14 +126,20 @@
   /// Collect all the source lines from the contexts of all spans in
   /// [highlights], and associates them with the highlights that cover them.
   static List<_Line> _collateLines(List<_Highlight> highlights) {
-    final highlightsByUrl = groupBy<_Highlight, Uri?>(
-        highlights, (highlight) => highlight.span.sourceUrl);
+    // Assign spans without URLs opaque Objects as keys. Each such Object will
+    // be different, but they can then be used later on to determine which lines
+    // came from the same span even if they'd all otherwise have `null` URLs.
+    final highlightsByUrl = groupBy<_Highlight, Object>(
+        highlights, (highlight) => highlight.span.sourceUrl ?? Object());
     for (var list in highlightsByUrl.values) {
       list.sort((highlight1, highlight2) =>
           highlight1.span.compareTo(highlight2.span));
     }
 
-    return highlightsByUrl.values.expand((highlightsForFile) {
+    return highlightsByUrl.entries.expand((entry) {
+      final url = entry.key;
+      final highlightsForFile = entry.value;
+
       // First, create a list of all the lines in the current file that we have
       // context for along with their line numbers.
       final lines = <_Line>[];
@@ -147,7 +153,6 @@
         final linesBeforeSpan =
             '\n'.allMatches(context.substring(0, lineStart)).length;
 
-        final url = highlight.span.sourceUrl;
         var lineNumber = highlight.span.start.line - linesBeforeSpan;
         for (var line in context.split('\n')) {
           // Only add a line if it hasn't already been added for a previous span.
@@ -162,14 +167,12 @@
       final activeHighlights = <_Highlight>[];
       var highlightIndex = 0;
       for (var line in lines) {
-        activeHighlights.removeWhere((highlight) =>
-            highlight.span.sourceUrl != line.url ||
-            highlight.span.end.line < line.number);
+        activeHighlights
+            .removeWhere((highlight) => highlight.span.end.line < line.number);
 
         final oldHighlightLength = activeHighlights.length;
         for (var highlight in highlightsForFile.skip(highlightIndex)) {
           if (highlight.span.start.line > line.number) break;
-          if (highlight.span.sourceUrl != line.url) break;
           activeHighlights.add(highlight);
         }
         highlightIndex += activeHighlights.length - oldHighlightLength;
@@ -258,9 +261,9 @@
   }
 
   /// Writes the beginning of the file highlight for the file with the given
-  /// [url].
-  void _writeFileStart(Uri? url) {
-    if (!_multipleFiles || url == null) {
+  /// [url] (or opaque object if it comes from a span with a null URL).
+  void _writeFileStart(Object url) {
+    if (!_multipleFiles || url is! Uri) {
       _writeSidebar(end: glyph.downEnd);
     } else {
       _writeSidebar(end: glyph.topLeftCorner);
@@ -409,7 +412,8 @@
   /// of [character].
   void _writeUnderline(_Line line, SourceSpan span, String character) {
     assert(!isMultiline(span));
-    assert(line.text.contains(span.text));
+    assert(line.text.contains(span.text),
+        '"${line.text}" should contain "${span.text}"');
 
     var startColumn = span.start.column;
     var endColumn = span.end.column;
@@ -664,7 +668,10 @@
   final int number;
 
   /// The URL of the source file in which this line appears.
-  final Uri? url;
+  ///
+  /// For lines created from spans without an explicit URL, this is an opaque
+  /// object that differs between lines that come from different spans.
+  final Object url;
 
   /// All highlights that cover any portion of this line, in source span order.
   ///
diff --git a/pubspec.yaml b/pubspec.yaml
index 08bf64b..ad81db6 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
 name: source_span
-version: 1.8.2-dev
+version: 1.8.2
 
 description: A library for identifying source spans and locations.
 homepage: https://github.com/dart-lang/source_span
diff --git a/test/multiple_highlight_test.dart b/test/multiple_highlight_test.dart
index b0c28a5..a9f5fda 100644
--- a/test/multiple_highlight_test.dart
+++ b/test/multiple_highlight_test.dart
@@ -311,4 +311,21 @@
   '"""));
     });
   });
+
+  test('highlights multiple null URLs as separate files', () {
+    final span1 = SourceSpan(SourceLocation(1, sourceUrl: null),
+        SourceLocation(4, sourceUrl: null), 'foo');
+    final span2 = SourceSpan(SourceLocation(1, sourceUrl: null),
+        SourceLocation(4, sourceUrl: null), 'bar');
+
+    expect(span1.highlightMultiple('one', {span2: 'two'}), equals("""
+  ,
+1 | foo
+  | ^^^ one
+  '
+  ,
+1 | bar
+  | === two
+  '"""));
+  });
 }
