We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6eaabeb commit 37d2a39Copy full SHA for 37d2a39
src/utils/internalLinks.js
@@ -70,6 +70,11 @@ export const decodeHashComponent = (string: string): string => {
70
*
71
* Return null if the operand doesn't match any known stream.
72
*/
73
+// Why does this parser need stream data? Because the operand formats
74
+// ("new" and "old") collide, and in choosing which format to apply, we
75
+// want to know if one or the other would give a real stream we know
76
+// about. Also, we can't get a stream ID from an "old"-format operand
77
+// without a mapping from stream names to IDs.
78
const parseStreamOperand = (operand, streamsById, streamsByName): null | number => {
79
// "New" (2018) format: ${stream_id}-${stream_name} .
80
const match = /^([\d]+)(?:-.*)?$/.exec(operand);
0 commit comments