Content-Length: 293972 | pFad | http://github.com/doxygen/doxygen/pull/11319

E6 Interaction between markdown blockquotes and sections by albert-github · Pull Request #11319 · doxygen/doxygen · GitHub
Skip to content

Interaction between markdown blockquotes and sections #11319

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

albert-github
Copy link
Collaborator

@albert-github albert-github commented Jan 4, 2025

In an example (package zlib_ng 2.2.3 on Fossies) I found the code like:

@page pg1 page

> text
## section

and this results in the warning like:

warning: found </blockquote> tag without matching <blockquote>

so it is better to terminate the block quote when a potential section command appears.

Example: example.tar.gz

In an example (Fossies) I found the code like:
```
@page pg1 page

> text
## section
```
and this results in the warning like:
```
warning: found </blockquote> tag without matching <blockquote>
```
so it is better to terminate the block quote when a potential section command appears
@albert-github albert-github added bug Markdown Markdown translation input related issue labels Jan 4, 2025
src/markdown.cpp Outdated
@@ -2854,6 +2854,9 @@ size_t Markdown::Private::writeBlockQuote(std::string_view data)
}
else
{
curLevel=level;
i = indent;
if (txt[0] == '#') break; // begin of markdown section command
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like there is a risk we get here while txt is empty and since it is a string_view txt[0] can then trigger an out-of-bounds assert (on some systems).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed.

Solved some corner cases as well

> text
##NO header

##Second test on no header

and

> text
 ## text

After review better determination of Atx header.

Solved some corner cases as well
```
> text
##NO header

##Second test on no header
```

and
```
> text
 ## text
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Markdown Markdown translation input related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/doxygen/doxygen/pull/11319

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy