diff --git a/packages/abbreviation/src/convert.ts b/packages/abbreviation/src/convert.ts
index 93840556..30b9efab 100644
--- a/packages/abbreviation/src/convert.ts
+++ b/packages/abbreviation/src/convert.ts
@@ -302,7 +302,7 @@ function insertHref(node: AbbreviationNode, text: string) {
if (urlRegex.test(text)) {
href = text;
if (!/\w+:/.test(href) && !href.startsWith('//')) {
- href = `http://${href}`;
+ href = `https://${href}`;
}
} else if (emailRegex.test(text)) {
href = `mailto:${text}`;
diff --git a/packages/abbreviation/test/convert.ts b/packages/abbreviation/test/convert.ts
index 245b2ca4..e0e42a26 100644
--- a/packages/abbreviation/test/convert.ts
+++ b/packages/abbreviation/test/convert.ts
@@ -58,7 +58,7 @@ describe('Convert token abbreviations', () => {
it('href', () => {
equal(parse('a', { href: true, text: 'https://www.google.it' }), 'https://www.google.it');
- equal(parse('a', { href: true, text: 'www.google.it' }), 'www.google.it');
+ equal(parse('a', { href: true, text: 'www.google.it' }), 'www.google.it');
equal(parse('a', { href: true, text: 'google.it' }), 'google.it');
equal(parse('a', { href: true, text: 'test here' }), 'test here');
equal(parse('a', { href: true, text: 'test@domain.com' }), 'test@domain.com');
@@ -66,14 +66,14 @@ describe('Convert token abbreviations', () => {
equal(parse('a', { href: true, text: 'test here www.domain.com' }), 'test here www.domain.com');
equal(parse('a[href=]', { href: true, text: 'https://www.google.it' }), 'https://www.google.it');
- equal(parse('a[href=]', { href: true, text: 'www.google.it' }), 'www.google.it');
+ equal(parse('a[href=]', { href: true, text: 'www.google.it' }), 'www.google.it');
equal(parse('a[href=]', { href: true, text: 'google.it' }), 'google.it');
equal(parse('a[href=]', { href: true, text: 'test here' }), 'test here');
equal(parse('a[href=]', { href: true, text: 'test@domain.com' }), 'test@domain.com');
equal(parse('a[href=]', { href: true, text: 'test here test@domain.com' }), 'test here test@domain.com');
equal(parse('a[href=]', { href: true, text: 'test here www.domain.com' }), 'test here www.domain.com');
equal(parse('a[class=here]', { href: true, text: 'test@domain.com' }), 'test@domain.com');
- equal(parse('a.here', { href: true, text: 'www.domain.com' }), 'www.domain.com');
+ equal(parse('a.here', { href: true, text: 'www.domain.com' }), 'www.domain.com');
equal(parse('a[class=here]', { href: true, text: 'test here test@domain.com' }), 'test here test@domain.com');
equal(parse('a.here', { href: true, text: 'test here www.domain.com' }), 'test here www.domain.com');
diff --git a/src/snippets/html.json b/src/snippets/html.json
index fa2a823f..18004aeb 100644
--- a/src/snippets/html.json
+++ b/src/snippets/html.json
@@ -1,7 +1,7 @@
{
"a": "a[href]",
- "a:blank": "a[href='http://${0}' target='_blank' rel='noopener noreferrer']",
- "a:link": "a[href='http://${0}']",
+ "a:blank": "a[href='https://${0}' target='_blank' rel='noopener noreferrer']",
+ "a:link": "a[href='https://${0}']",
"a:mail": "a[href='mailto:${0}']",
"a:tel": "a[href='tel:+${0}']",
"abbr": "abbr[title]",
diff --git a/test/expand.ts b/test/expand.ts
index 29bf03dd..6567b830 100644
--- a/test/expand.ts
+++ b/test/expand.ts
@@ -171,7 +171,7 @@ describe('Expand Abbreviation', () => {
});
it('wrap with abbreviation href', () => {
- equal(expand('a', { text: ['www.google.it'] }), 'www.google.it');
+ equal(expand('a', { text: ['www.google.it'] }), 'www.google.it');
equal(expand('a', { text: ['then www.google.it'] }), 'then www.google.it');
equal(expand('a', { text: ['www.google.it'], options: { 'markup.href': false } }), 'www.google.it');