View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0022333 | mantisbt | markdown | public | 2017-02-07 12:46 | 2017-04-01 00:13 |
Reporter | j_schultz | Assigned To | joel | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.1.0 | ||||
Target Version | 2.2.3 | Fixed in Version | 2.2.3 | ||
Summary | 0022333: Markdown starts heading in the middle of a line | ||||
Description | A hash character should only start a heading if it's found at the beginning of a line, but not like here:
| ||||
Tags | No tags attached. | ||||
Attached Files | |||||
This should probably also be a child of 0022180? |
|
I don't think this would be a big issue, because github behave the same as it is. |
|
What is the markup that you used? Neither |
|
Reopening because allowing a heading to start at the start of an enumeration item is both semantically wrong and is not identical to what Github does. |
|
This I entered on github |
|
This is not identical to my example, see above (there is an extra space in your example). My example can easily break the formatting of discussions about programming languages that make use of the "#" character at the start of a line, such as the C preprocessor (think of something like "#define" or "#include"). |
|
I got now your point @j_schultz, Thank you for clarifying your concern of the issue. I will add custom logic for this. |
|
This is a bug in upstream, no need to fix on our side. For this, I will open a ticket on the issue in github. https://github.com/erusev/parsedown/issues/479 |
|
Reading the discussions in the upstream issue tracker, I get the feeling that this issue won't get fixed anytime soon [1], so I would suggest implementing a workaround on our end (e.g. [2]). [1] see https://github.com/erusev/parsedown/issues/265, and particularly parsedown author's comment https://github.com/erusev/parsedown/issues/463#issuecomment-273702303 |
|
MantisBT: master-2.2 e4c0cceb 2017-03-06 04:02 Joel C. Llano Committer: dregad Details Diff |
Fix Markdown handling of # characters - remove incorrect logic to identify headers - ensure header detection abides by the CommonMark spec rules [1] - remove isBugLink method, which is no longer needed since bug links (i.e. `#number`) are not recognized as a header by the new regex Fixes 0022333 [1] http://spec.commonmark.org/0.27/#atx-headings Signed-off-by: Damien Regad <dregad@mantisbt.org> Changes to Joel's original code: squashed 2 commits, reworded commit message as well as the comments within the code. |
Affected Issues 0022333 |
|
mod - plugins/MantisCoreFormatting/core/MantisMarkdown.php | Diff File |