diff --git a/docs/docs/settings/spacing-rules.md b/docs/docs/settings/spacing-rules.md index dbca46cf..eee6eaf8 100644 --- a/docs/docs/settings/spacing-rules.md +++ b/docs/docs/settings/spacing-rules.md @@ -677,13 +677,13 @@ More content here Alias: `heading-blank-lines` -All headings have a blank line both before and after (except where the heading is at the beginning or end of the document). +All headings have one blank line both before and after (except where the heading is at the beginning or end of the document). ### Options | Name | Description | List Items | Default Value | | ---- | ----------- | ---------- | ------------- | -| `Bottom` | Insert a blank line after headings | N/A | `true` | +| `Bottom` | Ensures one blank line after headings | N/A | `true` | | `Empty Line Between YAML and Header` | Keep the empty line between the YAML frontmatter and header | N/A | `true` | ### Additional Info diff --git a/jest.config.ts b/jest.config.ts index c6b42571..157734a4 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -15,5 +15,7 @@ const config: Config.InitialOptions = { '!**/__integration__/*.[jt]s?(x)', '!**/test-vault/**/*.[jt]s?(x)', ], + // try to fix memory issues with jest when the UTs run + workerIdleMemoryLimit: '200MB', }; export default config; diff --git a/manifest-beta.json b/manifest-beta.json index 9deafa1e..059926f5 100644 --- a/manifest-beta.json +++ b/manifest-beta.json @@ -1,7 +1,7 @@ { "id": "obsidian-linter", "name": "Linter", - "version": "1.26.0-rc-3", + "version": "1.26.0", "minAppVersion": "1.5.7", "description": "Formats and styles your notes. It can be used to format YAML tags, aliases, arrays, and metadata; footnotes; headings; spacing; math blocks; regular markdown contents like list, italics, and bold styles; and more with the use of custom rule options as well.", "author": "Victor Tao", diff --git a/manifest.json b/manifest.json index 900bfa84..059926f5 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-linter", "name": "Linter", - "version": "1.25.0", + "version": "1.26.0", "minAppVersion": "1.5.7", "description": "Formats and styles your notes. It can be used to format YAML tags, aliases, arrays, and metadata; footnotes; headings; spacing; math blocks; regular markdown contents like list, italics, and bold styles; and more with the use of custom rule options as well.", "author": "Victor Tao", diff --git a/package.json b/package.json index 7c083ba7..7faf72fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-linter", - "version": "1.26.0-rc-3", + "version": "1.26.0", "description": "Enforces consistent markdown styling for Obsidian (https://obsidian.md). It can be used to format YAML tags, aliases, arrays, and metadata; footnotes; headings; spacing; math blocks; regular markdown contents like list, italics, and bold styles; and more with the use of custom rule options as well.", "main": "main.js", "scripts": { diff --git a/src/main.ts b/src/main.ts index da4e2709..07c2a558 100644 --- a/src/main.ts +++ b/src/main.ts @@ -11,7 +11,7 @@ import {createRunLinterRulesOptions, RulesRunner} from './rules-runner'; import {LinterError} from './linter-error'; import {LintConfirmationModal} from './ui/modals/lint-confirmation-modal'; import {SettingTab} from './ui/settings'; -import {pasteUrlRegex} from './utils/regex'; +import {urlRegex} from './utils/regex'; import {getTextInLanguage, LanguageStringKey, setLanguage} from './lang/helpers'; import {RuleAliasSuggest} from './cm6/rule-alias-suggester'; import {DEFAULT_SETTINGS, LinterSettings} from './settings-data'; @@ -618,10 +618,14 @@ export default class LinterPlugin extends Plugin { // because otherwise having 2 URLs cause Obsidian-breaking conflict. // Note: it looks like those two plugins look for an exact match for a URL, // so we will too. - if (pasteUrlRegex.test(plainClipboard.trim())) { + const text = plainClipboard.trim(); + if (urlRegex.test(text)) { + // debugger; + console.log('failed: "' + text + '"'); logWarn(getTextInLanguage('logs.paste-link-warning')); return; } + console.log('passed: "' + text + '"'); // prevent default pasting & abort when not successful clipboardEv.stopPropagation(); diff --git a/versions.json b/versions.json index cc506899..077e5f39 100644 --- a/versions.json +++ b/versions.json @@ -63,5 +63,6 @@ "1.23.1": "1.4.16", "1.23.2": "1.4.16", "1.24.0": "1.5.7", - "1.25.0": "1.5.7" + "1.25.0": "1.5.7", + "1.26.0": "1.5.7" }