summaryrefslogtreecommitdiffstats
path: root/src/markdown.cpp
Commit message (Collapse)AuthorAgeFilesLines
* issue #8251: Macro stopped working in 1.8,.19Dimitri van Heesch2020-12-151-4/+9
|
* Optimized the escape function and made it more genericDimitri van Heesch2020-11-051-6/+7
|
* issue #8156 Markdown anchors do not work with special symbolsalbert-github2020-11-031-1/+7
| | | | Replace the respective characters by an underscore.
* Merge pull request #8131 from albert-github/feature/issue_8130Dimitri van Heesch2020-10-281-2/+6
|\ | | | | issue #8130 Markdown relative links - not working for other folders
| * issue #8130 Markdown relative links - not working for other foldersalbert-github2020-10-261-2/+6
| | | | | | | | Always convert links to absolute path even when path exists
* | issue #8132 Markdown inclusion of images broken after 39db9f48albert-github2020-10-261-0/+4
|/ | | | see to it that the `\ilinebr` cannot be seen as part of the file name (backslashes can be present as path especially in case of windows).
* Merge pull request #8123 from albert-github/feature/bug_cnt_md_codeDimitri van Heesch2020-10-241-1/+1
|\ | | | | Miscounting lines with markdown backtick section
| * Miscounting lines with markdown backtick sectionalbert-github2020-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we have a program like: ``` # test ~~~ npm ~~~ \aa5 ~~~ npm ~~~ \aa8 ``` we get the warnings like: ``` .../aa.md:6: warning: Found unknown command '\aa5' .../aa.md:10: warning: Found unknown command '\aa8' ``` instead of: ``` .../aa.md:5: warning: Found unknown command '\aa5' .../aa.md:8: warning: Found unknown command '\aa8' ``` This has been corrected. Note: in the example tildes are used so the backticks show up in the github issue as well.
* | Merge pull request #8125 from albert-github/feature/bug_cnt_md_tableDimitri van Heesch2020-10-241-4/+4
|\ \ | | | | | | Miscounting lines with markdown table
| * | Miscounting lines with markdown tablealbert-github2020-10-221-4/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we have a program like: ``` # Test1 | \aa3 | | ---- | | \aa5 | \aa6 ``` we get the warnings like: ``` .../cc.md:3: warning: Found unknown command '\aa3' .../cc.md:4: warning: Found unknown command '\aa5' .../cc.md:6: warning: Found unknown command '\aa6' ``` instead of: ``` .../cc.md:4: warning: Found unknown command '\aa3' .../cc.md:5: warning: Found unknown command '\aa5' .../cc.md:6: warning: Found unknown command '\aa6' ``` The external counting was correct, not the internal counting. This has been corrected.
* | Miscounting lines with markdown blockquotealbert-github2020-10-221-3/+3
|/ | | | | | | | | | | | | | | | | | | | | | | When we have a program like: ``` # test \aa2 > \aa3 \aa4 ``` we get the warnings like: ``` .../aa.md:2: warning: Found unknown command '\aa2' .../aa.md:4: warning: Found unknown command '\aa3' .../aa.md:6: warning: Found unknown command '\aa4' ``` instead of: ``` .../aa.md:2: warning: Found unknown command '\aa2' .../aa.md:3: warning: Found unknown command '\aa3' .../aa.md:4: warning: Found unknown command '\aa4' ``` This has been corrected.
* Merge pull request #8114 from albert-github/feature/bug_cnt_md_extra_lineDimitri van Heesch2020-10-201-3/+7
|\ | | | | Miscounting in case of markdown wanted newline due to spaces at end of line
| * Update markdown.cppDimitri van Heesch2020-10-201-1/+1
| | | | | | Added size check
| * When we have some simple markdown files like with extra spaces (after ↵albert-github2020-10-181-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `\aa2`, `\bb2` and `\ccs2` to give in markdown a newline): ``` First test: 2 extra spaces after first line with error no extra empty lines \aa2 \aa3 ``` and ``` First test: 2 extra spaces after first line with error one extra empty line \bb2 \bb4 ``` and ``` First test: 2 extra spaces after first line with error two extra empty lines \cc2 \cc5 ``` we get warnings like: ``` .../aa.md:2: warning: Found unknown command '\aa2' .../aa.md:4: warning: Found unknown command '\aa3' .../bb.md:2: warning: Found unknown command '\bb2' .../bb.md:5: warning: Found unknown command '\bb4' .../cc.md:2: warning: Found unknown command '\cc2' .../cc.md:6: warning: Found unknown command '\cc5' ``` whilst this should be: ``` .../aa.md:2: warning: Found unknown command '\aa2' .../aa.md:3: warning: Found unknown command '\aa3' .../bb.md:2: warning: Found unknown command '\bb2' .../bb.md:4: warning: Found unknown command '\bb4' .../cc.md:2: warning: Found unknown command '\cc2' .../cc.md:5: warning: Found unknown command '\cc5' ``` This has been corrected by placing the `<br>` straight after the extra spaces and by not adding an extra newline.
* | Merge pull request #8117 from albert-github/feature/bug_cnt_md_ref_imageDimitri van Heesch2020-10-201-1/+1
|\ \ | | | | | | Miscounting of line in case of markdown `\ref` image
| * | Miscounting of line in case of markdown `\ref` imagealbert-github2020-10-191-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case we have: ``` The page \aa2 Doxygen's Doxygen Documentation: <a href="https://codedocs.xyz/doxygen/doxygen/"><img src="https://codedocs.xyz/doxygen/doxygen.svg"/></a>\aa2 \aa3 \aa4 ![Caption text](@ref https://codedocs.xyz/doxygen/doxygen.svg) \aa4 \aa5 ![Caption text](@ref https://codedocs.xyz/doxygen/doxygen.svg) \aa9 ``` we get the warnings: ``` .../aa.md:2: warning: Found unknown command '\aa2' .../aa.md:2: warning: Found unknown command '\aa2' .../aa.md:3: warning: Found unknown command '\aa3' .../aa.md:4: warning: Found unknown command '\aa4' .../aa.md:8: warning: Found unknown command '\aa4' .../aa.md:9: warning: Found unknown command '\aa5' .../aa.md:17: warning: Found unknown command '\aa9' ``` instead of the expected ``` .../aa.md:2: warning: Found unknown command '\aa2' .../aa.md:2: warning: Found unknown command '\aa2' .../aa.md:3: warning: Found unknown command '\aa3' .../aa.md:4: warning: Found unknown command '\aa4' .../aa.md:4: warning: Found unknown command '\aa4' .../aa.md:5: warning: Found unknown command '\aa5' .../aa.md:9: warning: Found unknown command '\aa9' ``` this is due to the fact that the markdown convertor adds some extra line wit `\n` instead of an internal line break `\ilinebr`.
* | Miscounting in markdown in case of a horizontal ruler.albert-github2020-10-181-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When having code like: ``` A horizonal ruler by means of underscores \aa2 ____ \aa4 A horizonal ruler by means of hyphens \bb7 - --- \bb9 A horizonal ruler by means of asterisks \cc12 **** \cc14 ``` we get wanungs like: ``` .../aa.md:2: warning: Found unknown command '\aa2' .../aa.md:5: warning: Found unknown command '\aa4' .../aa.md:8: warning: Found unknown command '\bb7' .../aa.md:11: warning: Found unknown command '\bb9' .../aa.md:14: warning: Found unknown command '\cc12' .../aa.md:17: warning: Found unknown command '\cc14' ``` instead of ``` .../aa.md:2: warning: Found unknown command '\aa2' .../aa.md:4: warning: Found unknown command '\aa4' .../aa.md:7: warning: Found unknown command '\bb7' .../aa.md:9: warning: Found unknown command '\bb9' .../aa.md:12: warning: Found unknown command '\cc12' .../aa.md:14: warning: Found unknown command '\cc14' ``` This has been fixed.
* Fix for compiler warning fix :-(Dimitri van Heesch2020-10-171-1/+1
|
* Fixes compiler warningDimitri van Heesch2020-10-171-1/+1
|
* Miscounting in case of markdown linksalbert-github2020-10-161-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we have simple input files like: ``` Chrome's trace viewer (Catapult) following the [instructions]( https://chromium.googlesource.com/catapult/+/refs/heads/master/tracing/docs/embedding-trace-viewer.md). This directory contains the helper files to embed Chrome's trace viewer. The current resources were generated/copied from [`Catapult@9508452e18f130c98499cb4c4f1e1efaedee8962` ]( https://chromium.googlesource.com/catapult/+/9508452e18f130c98499cb4c4f1e1efaedee8962). \aa11 ``` or ``` Add new exported module Text.Pandoc.Writers.AnnotatedTable [API change] (#6655, Christian Despres). This module (which should generally \bb3 ``` one gets (in the current master version, a5ac10888f6c0b0fc00678f67aa49036b33aa4cf): ``` .../aa.md:8: warning: Found unknown command '\aa11' .../bb.md:3: warning: Found unknown command '\bb4' ``` instead of ``` .../aa.md:11: warning: Found unknown command '\aa11' .../bb.md:4: warning: Found unknown command '\bb4' ``` this is due to the fact that the newlines inside the links are not taken into consideration during the conversion. We can add the extra newlines but have to do this inside the `<...>` as than they are handled correctly later on: - when adding them before the `<` doxygen sees a newline and will start a new paragraph starting with the link instead of keeping it in its place. - when adding them after the `>` we can get a warning about `warning: End of list marker found without any preceding list items` when after the closing `)` of the link there is directly a `.`
* Merge pull request #8079 from albert-github/feature/issue_8078Dimitri van Heesch2020-10-121-1/+1
|\ | | | | issue #8078 Warning and extra text when using Markdown as mainpage
| * issue #8078 Warning and extra text when using Markdown as mainpagealbert-github2020-10-061-1/+1
| | | | | | | | Also replace the `@` in a label.
* | Miscounting of lines in respect to page command (ATX header)albert-github2020-10-101-0/+1
| | | | | | | | | | | | | | | | | | | | In case of an ATX header for a page at the beginning of a file (i.e. `#...`) there is a line miscounting. Analogous as done for lines type: ``` The page ==== ``` in pull request #8056 we have to add an extra newline.
* | Incorrect counting of markdown verbatim blockalbert-github2020-10-081-1/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we have a file aa.md like: ``` Initial text 1 verbatim text? Some text \aa5 ``` and a file bb.md like ``` Initial text 1 verbatim text? Some text \aa4 `` we get the warnings like (with current master, with 1.8.20 it is even further off): ``` aa.md:6: warning: Found unknown command '\aa5' bb.md:5: warning: Found unknown command '\aa4' ``` instead of ``` aa.md:5: warning: Found unknown command '\aa5' bb.md:4: warning: Found unknown command '\aa4' ``` This has been corrected
* added support for mingw PRETTY_FUNC (#8059)ArmandZampieri2020-10-051-1/+1
| | | | | | | | | * added support for mingw PRETTY_FUNC * More compact Define test for PRETTY_FUNCTION * corrected synthax issue Co-authored-by: ZAMPIERI Armand <armand.zampieri@cmigroupe.com>
* Merge branch 'feature/bug_md_pg_cnt' of ↵Dimitri van Heesch2020-10-031-17/+19
|\ | | | | | | https://github.com/albert-github/doxygen into albert-github-feature/bug_md_pg_cnt
| * Miscounting of lines in respect to page commandalbert-github2020-09-241-17/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All examples together are a bit big so they are all in the attached file together with the warnings before and after this patch. When looking at the output we see that a number of lines are off by 1 ore more due to the insertion of extra lines in the code or due to the fact that there is a reference to the start of the documentation of the page and not the line of the page command. - commentscan.l in case of a rule contaiinge {DOCNL} this can be `=n` or `\ilinebr` in the later case this should not be replaced by `\n` as this results in an increase of the line count later on. in case of a page like command also register the line of the command as "topline". - entry.h, entry.cpp storage space for the "topline" registering the line of the page like commands. - doxygen.cpp setting and using the "topline" - markdown.cpp, markdown.h don't add a `\n` as this increases the line count but use the `\ilinebr` to get correct warnings see to it that when having empty lines at the top of the page and a page is added that the empty lines appear after the page command. - index.cpp using the "topline" instead of the "docLine" to get the correct warning - pagedef.cpp, pagedef.h set and retrieve the "topline" for page like commands. - util.cpp, util.h setting and using the "topline" in `addRelatedPage` use the known file name and line for the warning regarding the section label - cite.cpp, context.cpp, reflist.cpp changed to have good function calls.
* | No warning for unbalanced brackets in markdownalbert-github2020-09-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we have the input files qq.md. ``` @page xxx0 yyy0 @} Start of text @page xxx1 yyy1 @{ Start of text ``` and qqh.h: ``` /** @page xxxh0 yyyh0 @} Start of texth */ /** @page xxxh1 yyyh1 @{ Start of texth */ ``` we get the warnings: ``` qq.md:3: warning: unbalanced grouping commands qqh.h:4: warning: unbalanced grouping commands qqh.h:15: warning: end of file with unbalanced grouping commands ``` ``` so we are missing ``` qq.md:9: warning: end of file with unbalanced grouping commands ``` due to the fact that the closing routine was not called (also the open routine was not called, always good to call it the set variables to their proper values.
* | Merge pull request #8045 from albert-github/feature/bug_md_fenced_cntDimitri van Heesch2020-09-241-1/+1
|\ \ | |/ |/| Miscounting of lines in case of fenced code block
| * Miscounting of lines in case of fenced code blockalbert-github2020-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we have an example like: ~~~ Page ======= test text test text \error1 ``` make ``` ``` make ``` test text \error2 ~~~ we get the warnings: ``` aa.md:5: warning: Found unknown command '\error1' aa.md:17: warning: Found unknown command '\error2' ``` instead of ``` aa.md:5: warning: Found unknown command '\error1' aa.md:15: warning: Found unknown command '\error2' ``` this is due to the fact that there are 2 returns in case of a fenced code block, one with the ``endcode` but with the detection of the fenced code block (`isFencedCodeBlock`) it is not "removed".
* | issue #8037: Links using @ref stopped working in doxygen 1.8.19Dimitri van Heesch2020-09-211-0/+1
|/
* issue #7996 \ref commands broken in markdown tablesalbert-github2020-09-021-1/+1
| | | | the `\ilinebr` (internal line break) should be properly be separated from previous text.
* Spelling corrections is commentsalbert-github2020-08-091-1/+1
| | | | Some spelling omissions found by Fossies.
* Simplified code by passing lineNr directlyDimitri van Heesch2020-08-061-3/+1
|
* Coverity uninitialized variablealbert-github2020-08-061-1/+1
| | | | Coverity reported new uninitialized variable
* Fix for markdown emphasis processing regression.Dimitri van Heesch2020-08-051-2/+7
| | | | | Prevent <TT>__BLA</TT> .... <TT>BLA__</TT> from being detected as an emphasis section and causing the wrong output.
* Merge pull request #7782 from wataash/tagend-markdown-emDimitri van Heesch2020-08-031-2/+2
|\ | | | | issue #7781: allow '>' before Markdown emphasis
| * issue #7781: allow '>' before Markdown emphasisWataru Ashihara2020-05-231-2/+2
| |
* | Merge branch 'feature/issue_7923' of ↵Dimitri van Heesch2020-07-281-3/+5
|\ \ | | | | | | | | | https://github.com/albert-github/doxygen into albert-github-feature/issue_7923
| * | issue #7923 source line numbers in warnings output by parser are off by 1albert-github2020-07-271-3/+5
| | | | | | | | | | | | Explicit counting of the removed newlines at the beginning of a documenation block (markdown.cpp) so this number can be added to get a better line number in case of warnings.
* | | Additional tweaks to get markdown tables inside ALIASES workDimitri van Heesch2020-07-271-14/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Changed \_linebr to \ilinebr - \ilinebr is now also passed to doctokenizer - Also fixes issue #7493 regarding \snippet inside markdown tables and dealing with wrong line on issues detected by docparser after a markdown table. - Added function tracing to markdown (enabled with -d markdown in a debug build)
* | | Merge branch 'feature/issue_7787' of ↵Dimitri van Heesch2020-07-251-3/+17
|\ \ \ | |/ / |/| | | | | https://github.com/albert-github/doxygen into albert-github-feature/issue_7787
| * | issue #7787 Doxygen 1.8.18: Markdown tables not working in ALIASES anymore?albert-github2020-05-201-3/+17
| | | | | | | | | | | | The artificial newline characters in ALIASES (`^^`) or better said its doxygen replacements (`\\_linebr`) were not seen by the markdown parser as line terminator and as a consequence there was no table seen (it was just 1 long line, without header / data lines)..
* | | issue #7911 markdown table add extra test to "\copybrief"albert-github2020-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The comment speaks of: > // need at least one space on either side of the cell text in > // order for doxygen to do other formatting but in the implementation the end space is missing. Looks like the problem is introduced in version 1.8.17 when some work is done on the line counting (removing artificial `\n`).
* | | Refactor: Modernize clang parser and make it run with multiple threadsDimitri van Heesch2020-07-161-2/+1
| | |
* | | Multi-threaded parsing: added locks around global dataDimitri van Heesch2020-06-171-8/+0
| | |
* | | Refactor: modernize markdown and make it thread-safeDimitri van Heesch2020-06-161-421/+304
| | |
* | | issue #7796 Backticks (`) in Doxygen-markup-in-C in Markdown collapses (#7797)albert-github2020-06-131-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * issue #7796 Backticks (`) in Doxygen-markup-in-C in Markdown collapses The problem occurs when the backtick is just before the end of line. The fenced block will only terminate when the same number of fence characters are present, otherwise the search will continue. * issue #7796 Backticks (`) in Doxygen-markup-in-C in Markdown collapses Removed unintentional tab.
* | | Added experimental multi-thread input processing support.Dimitri van Heesch2020-05-311-10/+8
| |/ |/| | | | | | | This is disabled by default. It can be enabled by setting MULTITHREADED_INPUT to 1 in doxygen.h. Still has many data races, so don't use for anything other than development!
* | issue #7595 Links from one Markdown file to another do not workalbert-github2020-05-211-2/+4
|/ | | | | - the not linking in case of a the relative path (as there was no anchor for it) - (on windows) the created, internal, anchor for a file can contain a `:` but this is not possible in an anchor and has to be escaped.