diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -44,6 +44,7 @@ export default function extractAbbreviation(line, pos, lookAhead) {
 
 	let c;
 	const stream = new StreamReader(line);
+	stream.pos = pos;
 	const stack = [];
 
 	while (!stream.sol()) {
diff --git a/test/extract.js b/test/extract.js
index <HASH>..<HASH> 100644
--- a/test/extract.js
+++ b/test/extract.js
@@ -33,6 +33,7 @@ describe('Extract abbreviation', () => {
 	it('abbreviation with attributes', () => {
 		assert.deepEqual(extract('a foo[bar|]'), result('foo[bar]', 2));
 		assert.deepEqual(extract('a foo[bar="baz" a b]'), result('foo[bar="baz" a b]', 2));
+		assert.deepEqual(extract('foo bar[a|] baz'), result('bar[a]', 4));
 	});
 
 	it('tag test', () => {
💩 Set proper initial stream reader position