Skip to content

Commit

Permalink
Merge pull request #722 from pjkaufman/master
Browse files Browse the repository at this point in the history
Release Prep
  • Loading branch information
pjkaufman authored May 14, 2023
2 parents ae476f2 + 1ae93e6 commit 93a6e8a
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 8 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Each rule is its own set of logic and is designed to be run independently. This
### Content rules

- [auto-correct-common-misspellings](https://github.com/platers/obsidian-linter/blob/master/docs/rules.md#auto-correct-common-misspellings)
- [blockquote-style](https://github.com/platers/obsidian-linter/blob/master/docs/rules.md#blockquote-style)
- [convert-bullet-list-markers](https://github.com/platers/obsidian-linter/blob/master/docs/rules.md#convert-bullet-list-markers)
- [emphasis-style](https://github.com/platers/obsidian-linter/blob/master/docs/rules.md#emphasis-style)
- [no-bare-urls](https://github.com/platers/obsidian-linter/blob/master/docs/rules.md#no-bare-urls)
Expand Down Expand Up @@ -99,6 +100,7 @@ Each rule is its own set of logic and is designed to be run independently. This
- [remove-empty-lines-between-list-markers-and-checklists](https://github.com/platers/obsidian-linter/blob/master/docs/rules.md#remove-empty-lines-between-list-markers-and-checklists)
- [remove-link-spacing](https://github.com/platers/obsidian-linter/blob/master/docs/rules.md#remove-link-spacing)
- [remove-space-around-characters](https://github.com/platers/obsidian-linter/blob/master/docs/rules.md#remove-space-around-characters)
- [remove-space-before-or-after-characters](https://github.com/platers/obsidian-linter/blob/master/docs/rules.md#remove-space-before-or-after-characters)
- [space-after-list-markers](https://github.com/platers/obsidian-linter/blob/master/docs/rules.md#space-after-list-markers)
- [space-between-chinese-japanese-or-korean-and-english-or-numbers](https://github.com/platers/obsidian-linter/blob/master/docs/rules.md#space-between-chinese-japanese-or-korean-and-english-or-numbers)
- [trailing-spaces](https://github.com/platers/obsidian-linter/blob/master/docs/rules.md#trailing-spaces)
Expand Down
145 changes: 139 additions & 6 deletions docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -1546,6 +1546,71 @@ After:
http://www.Absoltely.com should not be corrected
``````

### Blockquote Style

Alias: `blockquote-style`

Makes sure the blockquote style is consistent.

Options:
- Style: The style used on blockquote indicators
- Default: `space`
- `space`: > indicator is followed by a space
- `no space`: >indicator is not followed by a space

Example: When style = `space`, a space is added to blockquotes missing a space after the indicator

Before:

``````markdown
>Blockquotes will have a space added if one is not present
> Will be left as is.

> Nested blockquotes are also updated
>>Nesting levels are handled correctly
>> Even when only partially needing updates
> >Updated as well
>>>>>>> Is handled too
> > >>> As well

> <strong>Note that html is not affected in blockquotes</strong>
``````

After:

``````markdown
> Blockquotes will have a space added if one is not present
> Will be left as is.

> Nested blockquotes are also updated
> > Nesting levels are handled correctly
> > Even when only partially needing updates
> > Updated as well
> > > > > > > Is handled too
> > > > > As well

> <strong>Note that html is not affected in blockquotes</strong>
``````
Example: When style = `no space`, spaces are removed after a blockquote indicator

Before:

``````markdown
> Multiple spaces are removed
> > Nesting is handled
> > > > > Especially when multiple levels are involved
> >>> > Even when partially correct already, it is handled
``````

After:

``````markdown
>Multiple spaces are removed
>>Nesting is handled
>>>>>Especially when multiple levels are involved
>>>>>Even when partially correct already, it is handled
``````

### Convert Bullet List Markers

Alias: `convert-bullet-list-markers`
Expand Down Expand Up @@ -3411,6 +3476,34 @@ Newlines are inserted.

A paragraph is a line that starts with a letter.
``````
Example: Paragraphs can be extended via the use of 2 or more spaces at the end of a line or line break html

Before:

``````markdown
# H1
Content
Paragraph content continued <br>
Paragraph content continued once more <br/>
Last line of paragraph
A new paragraph
# H2
``````

After:

``````markdown
# H1

Content
Paragraph content continued <br>
Paragraph content continued once more <br/>
Last line of paragraph

A new paragraph

# H2
``````

### Remove Empty Lines Between List Markers and Checklists

Expand Down Expand Up @@ -3589,23 +3682,23 @@ Before:
# List indicators should not have the space after them removed if they are followed by a fullwidth character

- [ contents here]
- [ more contents here] more text here
+ [ another item here]
- [ more contents here] more text here
+ [ another item here]
* [ one last item here]

# Nested in a block quote

> - [ contents here]
> - [ more contents here] more text here
> + [ another item here]
> - [ more contents here] more text here
> + [ another item here]
> * [ one last item here]

# Doubly nested in a block quote

> The following is doubly nested
> > - [ contents here]
> > - [ more contents here] more text here
> > + [ another item here]
> > - [ more contents here] more text here
> > + [ another item here]
> > * [ one last item here]
``````

Expand Down Expand Up @@ -3635,6 +3728,46 @@ After:
> > * [one last item here]
``````

### Remove Space Before or After Characters

Alias: `remove-space-before-or-after-characters`

Removes space before the specified characters and after the specified characters. Note that this may causes issues with markdown format in some cases.

Options:
- 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.**
- Default: `,!?;:).’”]`
- 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.**
- Default: `¿¡‘“([`

Example: Remove Spaces and Tabs Before and After Default Symbol Set

Before:

``````markdown
In the end , the space gets removed .
The space before the question mark was removed right ?
The space before the exclamation point gets removed !
A semicolon ; and colon : have spaces removed before them
‘ Text in single quotes ’
“ Text in double quotes ”
[ Text in square braces ]
( Text in parenthesis )
``````

After:

``````markdown
In the end, the space gets removed.
The space before the question mark was removed right?
The space before the exclamation point gets removed!
A semicolon; and colon: have spaces removed before them
‘Text in single quotes’
“Text in double quotes”
[Text in square braces]
(Text in parenthesis)
``````

### Space after list markers

Alias: `space-after-list-markers`
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-linter",
"name": "Linter",
"version": "1.13.0",
"version": "1.14.0",
"minAppVersion": "0.15.6",
"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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-linter",
"version": "1.13.0",
"version": "1.14.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": {
Expand Down
1 change: 1 addition & 0 deletions versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"1.14.0": "0.15.6",
"1.13.0": "0.15.6",
"1.12.0": "0.15.6",
"1.11.0": "0.15.6",
Expand Down

0 comments on commit 93a6e8a

Please sign in to comment.