diff --git a/docs/docs/settings/content-rules.md b/docs/docs/settings/content-rules.md index fe646fb1..422f58bb 100644 --- a/docs/docs/settings/content-rules.md +++ b/docs/docs/settings/content-rules.md @@ -8,7 +8,7 @@ Alias: `auto-correct-common-misspellings` -Uses a dictionary of common misspellings to automatically convert them to their proper spellings. See [auto-correct map](https://github.com/platers/obsidian-linter/tree/master/src/utils/auto-correct-misspellings.ts) for the full list of auto-corrected words. **Note: this list can work on text from multiple languages, but this list is the same no matter what language is currently in use.** +Uses a dictionary of common misspellings to automatically convert them to their proper spellings. See auto-correct map for the full list of auto-corrected words. Note: this list can work on text from multiple languages, but this list is the same no matter what language is currently in use. ### Options @@ -16,7 +16,7 @@ Uses a dictionary of common misspellings to automatically convert them to their | ---- | ----------- | ---------- | ------------- | | `Ignore Words` | A comma separated list of lowercased words to ignore when auto-correcting | N/A | | | `Skip Words with Multiple Capitals` | Will skip any files that have a capital letter in them other than as the first letter of the word. Acronyms and some other words can benefit from this. It may cause issues with proper nouns being properly fixed. | N/A | false | -| `Extra Auto-Correct Source Files` | These are files that have a markdown table in them that have the initial word and the word to correct it to (these are case insensitive corrections). **Note: the tables used should have the starting and ending `|` indicators present for each line.** | N/A | | +| `Extra Auto-Correct Source Files` | These are files that have a markdown table in them that have the initial word and the word to correct it to (these are case insensitive corrections). Note: the tables used should have the starting and ending \| indicators present for each line. | N/A | | ### Additional Info @@ -281,7 +281,7 @@ Add a default language to code fences that do not have a language specified. | Name | Description | List Items | Default Value | | ---- | ----------- | ---------- | ------------- | -| `Programming Language` | Leave empty to do nothing. Languages tags can be found [here](https://prismjs.com/#supported-languages). | N/A | | +| `Programming Language` | Leave empty to do nothing. Languages tags can be found here. | N/A | | @@ -606,14 +606,15 @@ After: Alias: `ordered-list-style` -Makes sure that ordered lists follow the style specified. **Note: that 2 spaces or 1 tab is considered to be an indentation level.** +Makes sure that ordered lists follow the style specified. Note: that 2 spaces or 1 tab is considered to be an indentation level. ### Options | Name | Description | List Items | Default Value | | ---- | ----------- | ---------- | ------------- | -| `Number Style` | The number style used in ordered list indicators | `ascending`: Makes sure ordered list items are ascending (i.e. 1, 2, 3, etc.)

`lazy`: Makes sure ordered list item indicators all are the number 1 | `ascending` | +| `Number Style` | The number style used in ordered list indicators | `ascending`: Makes sure ordered list items are ascending (i.e. 1, 2, 3, etc.)

`lazy`: Makes sure ordered list item indicators all are the same

`preserve`: Preserves ordered list item indicators as they are | `ascending` | | `Ordered List Indicator End Style` | The ending character of an ordered list indicator | `.`: Makes sure ordered list items indicators end in '.' (i.e `1.`)

`)`: Makes sure ordered list item indicators end in ')' (i.e. `1)`) | `.` | +| `Preserve Starting Number` | Whether to preserve the starting number of an ordered list. This can be used to have an ordered list that has content in between the ordered list items. | N/A | `undefined` | @@ -741,6 +742,126 @@ After: 1) Item 3 `````` +
Ordered lists have list items set to ascending numerical order using initial indicator number when Number Style is `ascending` and `preserveStart` is enabled + +Before: + +`````` markdown +1. Item 1 +2. Item 2 +4. Item 3 + +Some text here + +4. Item 4 +5. Item 5 +7. Item 6 +`````` + +After: + +`````` markdown +1. Item 1 +2. Item 2 +3. Item 3 + +Some text here + +4. Item 4 +5. Item 5 +6. Item 6 +`````` +
+
Nested ordered lists have list items set to ascending numerical order using initial indicator number when Number Style is `ascending` and `preserveStart` is enabled + +Before: + +`````` markdown +4. Item 4 +2. Item 5 + 2. Subitem 2 + 5. Subitem 3 + 2. Subitem 4 +4. Item 6 +`````` + +After: + +`````` markdown +4. Item 4 +5. Item 5 + 2. Subitem 2 + 3. Subitem 3 + 4. Subitem 4 +6. Item 6 +`````` +
+
Ordered lists have list items set to initial indicator number when Number Style is `lazy` and `preserveStart` is enabled + +Before: + +`````` markdown +2. Item 2 +5. Item 3 +4. Item 4 +`````` + +After: + +`````` markdown +2. Item 2 +2. Item 3 +2. Item 4 +`````` +
+
Nested ordered lists have list items set to initial indicator number when Number Style is `lazy` and `preserveStart` is enabled + +Before: + +`````` markdown +4. Item 4 +2. Item 5 + 2. Subitem 2 + 5. Subitem 3 + 2. Subitem 4 +4. Item 6 +`````` + +After: + +`````` markdown +4. Item 4 +4. Item 5 + 2. Subitem 2 + 2. Subitem 3 + 2. Subitem 4 +4. Item 6 +`````` +
+
Ordered lists items are not modified when Number Style is `preserve` + +Before: + +`````` markdown +4. Item 4 +2. Item 5 + 2. Subitem 2 + 5. Subitem 3 + 2. Subitem 4 +4. Item 6 +`````` + +After: + +`````` markdown +4. Item 4 +2. Item 5 + 2. Subitem 2 + 5. Subitem 3 + 2. Subitem 4 +4. Item 6 +`````` +
## Proper Ellipsis @@ -779,9 +900,9 @@ Updates the quotes in the body content to be updated to the specified single and | Name | Description | List Items | Default Value | | ---- | ----------- | ---------- | ------------- | -| `Enable `Single Quote Style`` | Specifies that the selected single quote style should be used. | N/A | `true` | +| `Enable Single Quote Style` | Specifies that the selected single quote style should be used. | N/A | `true` | | `Single Quote Style` | The style of single quotes to use. | `''`: Uses "'" instead of smart single quotes

`‘’`: Uses "‘" and "’" instead of straight single quotes | `''` | -| `Enable `Double Quote Style`` | Specifies that the selected double quote style should be used. | N/A | `true` | +| `Enable Double Quote Style` | Specifies that the selected double quote style should be used. | N/A | `true` | | `Double Quote Style` | The style of double quotes to use. | `""`: Uses '"' instead of smart double quotes

`“”`: Uses '“' and '”' instead of straight double quotes | `""` | diff --git a/docs/docs/settings/footnote-rules.md b/docs/docs/settings/footnote-rules.md index a9fbff0c..5b2b5c63 100644 --- a/docs/docs/settings/footnote-rules.md +++ b/docs/docs/settings/footnote-rules.md @@ -93,7 +93,7 @@ Maecenas malesuada dignissim purus ac volutpat. Alias: `re-index-footnotes` -Re-indexes footnote keys and footnote, based on the order of occurrence. **Note: This rule does _not_ work if there is more than one footnote for a key.** +Re-indexes footnote keys and footnote, based on the order of occurrence. Note: This rule does not work if there is more than one footnote for a key. diff --git a/docs/docs/settings/heading-rules.md b/docs/docs/settings/heading-rules.md index b548ec02..f699e5e8 100644 --- a/docs/docs/settings/heading-rules.md +++ b/docs/docs/settings/heading-rules.md @@ -309,7 +309,7 @@ After: Alias: `remove-trailing-punctuation-in-heading` -Removes the specified punctuation from the end of headings making sure to ignore the semicolon at the end of [HTML entity references](https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references). +Removes the specified punctuation from the end of headings making sure to ignore the semicolon at the end of HTML entity references. ### Options diff --git a/docs/docs/settings/spacing-rules.md b/docs/docs/settings/spacing-rules.md index f39737ca..eb5ac71a 100644 --- a/docs/docs/settings/spacing-rules.md +++ b/docs/docs/settings/spacing-rules.md @@ -172,7 +172,7 @@ After: Alias: `empty-line-around-blockquotes` -Ensures that there is an empty line around blockquotes unless they start or end a document. **Note: an empty line is either one less level of nesting for blockquotes or a newline character.** +Ensures that there is an empty line around blockquotes unless they start or end a document. Note: an empty line is either one less level of nesting for blockquotes or a newline character. @@ -512,7 +512,7 @@ Content Alias: `empty-line-around-math-blocks` -Ensures that there is an empty line around math blocks using `Number of Dollar Signs to Indicate a Math Block` to determine how many dollar signs indicates a math block for single-line math. +Ensures that there is an empty line around math blocks using Number of Dollar Signs to Indicate a Math Block to determine how many dollar signs indicates a math block for single-line math. @@ -948,7 +948,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Alias: `move-math-block-indicators-to-their-own-line` -Move all starting and ending math block indicators to their own lines using `Number of Dollar Signs to Indicate a Math Block` to determine how many dollar signs indicates a math block for single-line math. +Move all starting and ending math block indicators to their own lines using Number of Dollar Signs to Indicate a Math Block to determine how many dollar signs indicates a math block for single-line math. @@ -1328,7 +1328,7 @@ After: Alias: `remove-space-around-characters` -Ensures that certain characters are not surrounded by whitespace (either single spaces or a tab). **Note: this may causes issues with markdown format in some cases.** +Ensures that certain characters are not surrounded by whitespace (either single spaces or a tab). Note: this may causes issues with markdown format in some cases. ### Options @@ -1430,14 +1430,14 @@ After: Alias: `remove-space-before-or-after-characters` -Removes space before the specified characters and after the specified characters. **Note: this may causes issues with markdown format in some cases.** +Removes space before the specified characters and after the specified characters. Note: this may causes issues with markdown format in some cases. ### Options | Name | Description | List Items | Default Value | | ---- | ----------- | ---------- | ------------- | -| `Remove Space Before Characters` | Removes space before the specified characters. **Note: using `{` or `}` in the list of characters will unexpectedly affect files as it is used in the ignore syntax behind the scenes.** | N/A | `,!?;:).’”]` | -| `Remove Space After Characters` | Removes space after the specified characters. **Note: using `{` or `}` in the list of characters will unexpectedly affect files as it is used in the ignore syntax behind the scenes.** | N/A | `¿¡‘“([` | +| `Remove Space Before Characters` | Removes space before the specified characters. Note: using { or } in the list of characters will unexpectedly affect files as it is used in the ignore syntax behind the scenes. | N/A | `,!?;:).’”]` | +| `Remove Space After Characters` | Removes space after the specified characters. >Note: using { or } in the list of characters will unexpectedly affect files as it is used in the ignore syntax behind the scenes. | N/A | `¿¡‘“([` | @@ -1513,14 +1513,14 @@ After: Alias: `space-between-chinese-japanese-or-korean-and-english-or-numbers` -Ensures that Chinese, Japanese, or Korean and English or numbers are separated by a single space. Follows these [guidelines](https://github.com/sparanoid/chinese-copywriting-guidelines) +Ensures that Chinese, Japanese, or Korean and English or numbers are separated by a single space. Follows these guidelines ### Options | Name | Description | List Items | Default Value | | ---- | ----------- | ---------- | ------------- | -| `English Punctuations and Symbols Before CJK` | The list of non-letter punctuation and symbols to consider to be from English when found before Chinese, Japanese, or Korean characters. **Note: "*" is always considered to be English and is necessary for handling some markdown syntaxes properly.** | N/A | `-+;:'"°%$)]` | -| `English Punctuations and Symbols After CJK` | The list of non-letter punctuation and symbols to consider to be from English when found after Chinese, Japanese, or Korean characters. **Note: "*" is always considered to be English and is necessary for handling some markdown syntaxes properly.** | N/A | `-+'"([¥$` | +| `English Punctuations and Symbols Before CJK` | The list of non-letter punctuation and symbols to consider to be from English when found before Chinese, Japanese, or Korean characters. Note: "*" is always considered to be English and is necessary for handling some markdown syntaxes properly. | N/A | `-+;:'"°%$)]` | +| `English Punctuations and Symbols After CJK` | The list of non-letter punctuation and symbols to consider to be from English when found after Chinese, Japanese, or Korean characters. Note: "*" is always considered to be English and is necessary for handling some markdown syntaxes properly. | N/A | `-+'"([¥$` | diff --git a/docs/docs/settings/yaml-rules.md b/docs/docs/settings/yaml-rules.md index 5ca7bd7e..8368af9e 100644 --- a/docs/docs/settings/yaml-rules.md +++ b/docs/docs/settings/yaml-rules.md @@ -513,15 +513,15 @@ tags: Alias: `format-yaml-array` -Allows for the formatting of regular YAML arrays as either multi-line or single-line and `tags` and `aliases` are allowed to have some Obsidian specific YAML formats. **Note: that single string to single-line goes from a single string entry to a single-line array if more than 1 entry is present. The same is true for single string to multi-line except it becomes a multi-line array.** +Allows for the formatting of regular YAML arrays as either multi-line or single-line and tags and aliases are allowed to have some Obsidian specific YAML formats. Note: that single string to single-line goes from a single string entry to a single-line array if more than 1 entry is present. The same is true for single string to multi-line except it becomes a multi-line array. ### Options | Name | Description | List Items | Default Value | | ---- | ----------- | ---------- | ------------- | -| `Format YAML aliases section` | Turns on formatting for the YAML aliases section. You should not enable this option alongside the rule `YAML Title Alias` as they may not work well together or they may have different format styles selected causing unexpected results. | N/A | `true` | +| `Format YAML aliases section` | Turns on formatting for the YAML aliases section. You should not enable this option alongside the rule YAML Title Alias as they may not work well together or they may have different format styles selected causing unexpected results. | N/A | `true` | | `Format YAML tags section` | Turns on formatting for the YAML tags section. | N/A | `true` | -| `Default YAML array section style` | The style of other YAML arrays that are not `tags`, `aliases` or in `Force key values to be single-line arrays` and `Force key values to be multi-line arrays` | `multi-line`: ```key:\n - value```

`single-line`: ```key: [value]``` | `single-line` | +| `Default YAML array section style` | The style of other YAML arrays that are not tags, aliases or in Force key values to be single-line arrays and Force key values to be multi-line arrays | `multi-line`: ```key:\n - value```

`single-line`: ```key: [value]``` | `single-line` | | `Format YAML array sections` | Turns on formatting for regular YAML arrays | N/A | `true` | | `Force key values to be single-line arrays` | Forces the YAML array for the new line separated keys to be in single-line format (leave empty to disable this option) | N/A | | | `Force key values to be multi-line arrays` | Forces the YAML array for the new line separated keys to be in multi-line format (leave empty to disable this option) | N/A | | @@ -670,7 +670,7 @@ Move all tags to YAML frontmatter of the document. | Name | Description | List Items | Default Value | | ---- | ----------- | ---------- | ------------- | | `Body tag operation` | What to do with non-ignored tags in the body of the file once they have been moved to the frontmatter | `Nothing`: Leaves tags in the body of the file alone

`Remove hashtag`: Removes `#` from tags in content body after moving them to the YAML frontmatter

`Remove whole tag`: Removes the whole tag in content body after moving them to the YAML frontmatter. _Note that this removes the first space prior to the tag as well_ | `Nothing` | -| `Tags to ignore` | The tags that will not be moved to the tags array or removed from the body content if `Remove the hashtag from tags in content body` is enabled. Each tag should be on a new line and without the `#`. **Make sure not to include the hashtag in the tag name.** | N/A | | +| `Tags to ignore` | The tags that will not be moved to the tags array or removed from the body content if Remove the hashtag from tags in content body is enabled. Each tag should be on a new line and without the #. Make sure not to include the hashtag in the tag name. | N/A | | @@ -939,7 +939,7 @@ arr2: Alias: `yaml-key-sort` -Sorts the YAML keys based on the order and priority specified. **Note: may remove blank lines as well. Only works on non-nested keys.** +Sorts the YAML keys based on the order and priority specified. Note: may remove blank lines as well. Only works on non-nested keys. ### Options @@ -1083,8 +1083,9 @@ Keep track of the date the file was last edited in the YAML front matter. Gets d | `Date Modified` | Insert the date the file was last modified | N/A | `true` | | `Date Modified Key` | Which YAML key to use for modification date | N/A | `date modified` | | `Date Modified Source of Truth` | Specifies what way should be used to determine when the date modified should be updated if it is already present in the frontmatter. | `file system`: The file system date modified value is used to set the value of date modified in the frontmatter

`user or Linter edits`: When a value is present in the frontmatter for date modified, date modified is kept as is unless the user or the Linter makes a change to the file | `file system` | -| `Format` | Moment date format to use (see [Moment format options](https://momentjscom.readthedocs.io/en/latest/moment/04-displaying/01-format/)) | N/A | `dddd, MMMM Do YYYY, h:mm:ss a` | +| `Format` | Moment date format to use (see Moment format options) | N/A | `dddd, MMMM Do YYYY, h:mm:ss a` | | `Convert Local Time to UTC` | Uses UTC equivalent for saved dates instead of local time | N/A | false | +| `Update YAML Timestamp on File Contents Update` | When the currently active note is modified, YAML Timestamp is run on the note. This should update the modified note timestamp if it is more than 5 seconds off from the current value. | `never`: never

`after 5 seconds`: after 5 seconds

`after 10 seconds`: after 10 seconds

`after 15 seconds`: after 15 seconds

`after 30 seconds`: after 30 seconds

`after 1 minute`: after 1 minute | `never` | ### Additional Info @@ -1355,9 +1356,9 @@ Inserts or updates the title of the file into the YAML frontmatter's aliases sec | Name | Description | List Items | Default Value | | ---- | ----------- | ---------- | ------------- | -| `Preserve existing aliases section style` | If set, the `YAML aliases section style` setting applies only to the newly created sections | N/A | `true` | +| `Preserve existing aliases section style` | If set, the YAML aliases section style setting applies only to the newly created sections | N/A | `true` | | `Keep alias that matches the filename` | Such aliases are usually redundant | N/A | false | -| `Use the YAML key specified by `Alias Helper Key` to help with filename and heading changes` | If set, when the first H1 heading changes or filename if first H1 is not present changes, then the old alias stored in this key will be replaced with the new value instead of just inserting a new entry in the aliases array | N/A | `true` | +| `Use the YAML key specified by Alias Helper Key to help with filename and heading changes` | If set, when the first H1 heading changes or filename if first H1 is not present changes, then the old alias stored in this key will be replaced with the new value instead of just inserting a new entry in the aliases array | N/A | `true` | | `Alias Helper Key` | The key to use to help keep track of what the last file name or heading was that was stored in the frontmatter by this rule. | N/A | `linter-yaml-title-alias` | ### Additional Info diff --git a/manifest-beta.json b/manifest-beta.json index 37203529..e0cdd2bc 100644 --- a/manifest-beta.json +++ b/manifest-beta.json @@ -1,7 +1,7 @@ { "id": "obsidian-linter", "name": "Linter", - "version": "1.27.0-rc-1", + "version": "1.27.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 059926f5..e0cdd2bc 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-linter", "name": "Linter", - "version": "1.26.0", + "version": "1.27.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 ab70d212..2e6f6dd4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-linter", - "version": "1.27.0-rc-1", + "version": "1.27.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/docs.ts b/src/docs.ts index 1cd17abd..c30cd25d 100644 --- a/src/docs.ts +++ b/src/docs.ts @@ -91,7 +91,7 @@ function generateDocs() { defaultValue = `\`${defaultValue}\``; } const text = dedent` - | \`${option.getName().replaceAll('|', '\\|')}\` | ${option.getDescription().replaceAll('|', '\\|')}} | ${listItems} | ${defaultValue} | + | \`${option.getName().replaceAll('|', '\\|')}\` | ${option.getDescription().replaceAll('|', '\\|')} | ${listItems} | ${defaultValue} | `; diff --git a/versions.json b/versions.json index 077e5f39..601bcd0a 100644 --- a/versions.json +++ b/versions.json @@ -64,5 +64,6 @@ "1.23.2": "1.4.16", "1.24.0": "1.5.7", "1.25.0": "1.5.7", - "1.26.0": "1.5.7" + "1.26.0": "1.5.7", + "1.27.0": "1.5.7" }