Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoformat --- for horizontal rule #5720

Closed
zadam opened this issue Nov 10, 2019 · 5 comments · Fixed by #8646
Closed

Autoformat --- for horizontal rule #5720

zadam opened this issue Nov 10, 2019 · 5 comments · Fixed by #8646
Assignees
Labels
intro Good first ticket. package:autoformat squad:core Issue to be handled by the Core team. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@zadam
Copy link

zadam commented Nov 10, 2019

📝 Provide a description of the new feature

Typing --- should insert horizontal rule just like in Markdown (btw this is used below in this issue template). This was mentioned in the #1365 but marked as "not a part of MVP".


If you'd like to see this feature implemented, add a 👍 reaction to this post.

@zadam zadam added the type:feature This issue reports a feature request (an idea for a new functionality or a missing option). label Nov 10, 2019
@Mgsy Mgsy added this to the backlog milestone Nov 15, 2019
@neongreen
Copy link

@Reinmar Reinmar added package:autoformat intro Good first ticket. labels Nov 30, 2020
@Reinmar
Copy link
Member

Reinmar commented Nov 30, 2020

The tricky thing is that autoformat is about formatting and here we want to insert something. We'd need to check whether it'll actually work. Unless, you checked it already?

@neongreen
Copy link

Haven't checked, unfortunately. It didn't occur to me there could be a difference between formatting and insertion.

@oleq oleq modified the milestones: backlog, iteration 39 Dec 7, 2020
@maxbarnas
Copy link
Contributor

maxbarnas commented Dec 10, 2020

A few interesting cases regarding this autoformatting feature:

Non-intrusive

  • ---^foobar creates new paragraph with foobar below the newly created horizontal line.
  • Blockquote allows the horizontal line to be created inside itself.
  • --- inside empty headings leaves the heading, then creates the horizontal line, then a new paragraph.
  • ---^heading leaves one heading, creates a horizontal line, and creates a new heading with the original content, heading.

Slightly confusing

@maxbarnas
Copy link
Contributor

maxbarnas commented Jan 4, 2021

Typical behavior in other editors:

  • CKE5
    • -- => (en-dash).
    • --- => (em-dash).
  • CKE4
    • none? 
  • Slack post editor and Notion:
    • -- => (em-dash).
    • --- => horizontal line.
  • LibreOffice Writer
    • -- => (em-dash).
    • ---<Enter> (or more -) => horizontal line (check Apply Borders in AutoCorrect options dialog).
  • Word 365
    • -- => (en-dash).
    • ---<Enter> => horizontal line (only inside empty paragraphs).
  • Google Docs
    • Autoformat is disabled by default. When turned on, there's no default rules for dashes whatsoever.

oleq added a commit that referenced this issue Jan 19, 2021
Feature (autoformat): Horizontal line can be inserted by typing `---` in an empty block. Closes #5720.
Docs (horizontal-line): Updated documentation after integration with the Autoformatting feature (see #5720).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
intro Good first ticket. package:autoformat squad:core Issue to be handled by the Core team. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants