Unable to mention category as first text on line

markdown-it-review

(Joshua Rosenfeld) #1

Continuing the discussion from Mentioning Categories instead of Groups?:

Summary:

Unable to mention a category when the hashtag is the first text on a line.

Steps to reproduce:

  1. Create topic or post
  2. Add category preceeded by hashtag as first text on a line

Expected Results:

Editor offers to autocomplete category name and create mention

Actual Results:

Level 1 header is created

Notes:

Understand that this conflicts with Markdown spec, so not sure how this could be solved.

Attachments:

This is what happens with a category mention on its own line:
#howto

Versions and Mods:

Discourse 1.5.0.beta7 (meta.discourse.org)

System Information:

Windows 10 Pro, Chrome Stable 47


Mentioning Categories instead of Groups?
(Alan Tan) #2

This isn’t a bug, I added rules to make sure this does not conflict with Markdown’s ATX-style headers.

#This is a h1 header
# This is also a h1 header

(Jeff Atwood) #3

In commonmark the space is required so I think you can safely ignore that.


(Alan Tan) #4

Until we port over to commonmark, the headers are going to conflict with the autocomplete which doesn’t look good to me UX wise. :philosoraptor:


(Jeff Atwood) #5