summaryrefslogtreecommitdiffstats
path: root/src/docparser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of https://github.com/ahoogol/doxygen into ahoogol-masterDimitri van Heesch2017-12-281-1/+122
|\
| * Fixed compile errors in clang and gccahoogol2017-06-281-12/+12
| |
| * Added support for RTL(right to left) languages like Arabic and Persian in ↵ahoogol2017-06-251-1/+122
| | | | | | | | HTML output
* | Merge pull request #613 from Cyberboss/patch-1Dimitri van Heesch2017-12-241-1/+12
|\ \ | | | | | | Suppresses warning for XML <see langword="..."/>
| * | Suppresses warning for XML <see langword="..."/>Jordan Brown2017-10-191-1/+12
| | |
* | | Propagate language information to all <programlisting> XML elements.Vladimír Vondruš2017-11-191-0/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is based on work done in 141dbfd5a4f79c98da14a1b414c6db4e1b34618b through ed9acb6e1bb81a2eec334180f7b8c1bf0598b444 and makes a few behavioral changes to it. There's a new attribute called `filename` and the `language` was removed, because it could provide misleading information. This allows for more flexibility on the user side. In particular: * For historical reasons, `*.txt` files are marked by Doxygen as C++ (see https://bugzilla.gnome.org/show_bug.cgi?id=760836 for details). In particular, code snippet included from a CMakeLists.txt file would be marked and highlighted as C++. So in this case, the language attribute would be very misleading. * Doxygen is aware only of a very small subset of languages and thus a lot of information can be lost when relying on its extension-to-language-name conversion -- in particular, all extensions that are not recognized are assumed to be C++. On the other hand, putting more effort into its language detection algorithms is not worth the time, as there will always be new languages that fail to detect. So let's leave that on the user of the XML output instead. * Using just file extension is not enough, it has to be a full filename. For example, `*.txt` can be either a plain text file or a `CMakeLists.txt`. * The path is not stripped from the filename, as it also may contain additional information that helps to detect the language better. In addition to that, filenames of code snippets included via the \include command and related are propagated to the <programlisting> element as well. With this change, (1) code snippets using simply \code some code \endcode will not produce any `filename` attribute and it's up to the user what to do -- assume C++, detect language from contents or not highlight anything. <programlisting> some code </programlisting> (2) Code snippets using \code{.cmake} some code \endcode will produce the following: <programlisting filename=".cmake"> some code </programlisting> (3) And finally, \include, \dontinclude and related \skip, \skipline etc. commands \include path/to/some-file.py will produce <programlisting filename="path/to/some-file.py"> some code </programlisting> The tests were updated to check all three cases. On the user side, when using Pygments for example, it's then just a matter of calling pygments.lexers.find_lexer_class_for_filename() with value of the `filename` attribute value and optionally also the code snippet for additional language analysis.
* | Misc. doxy and comment typosluzpaz2017-08-021-1/+1
|/
* Bug 770660 - Code snippet always shows line numbers from 1albert-github2016-09-031-1/+5
| | | | | | | | | This patch makes the handling of the \snippet and other commands consistent between the different languages (no line numbers anymore with python) and also introduces analogous to \includelineno the command \snippetlineno. Some non relevant changes: - *code.l Calculation of the end line was incorrect, in case of a snippet the end line was the number of lines of the snippet and not reltive to the start line. - *code.l made consistent over the different laguages, enabling exBlock and inlineFragment - testing/indexpage.xml in test 14 the \snippet command was used with python and giving line numbers, linenumbers are now gone (consistency)
* Warnings from CLANG compileralbert-github2016-08-281-0/+5
| | | | The CLANG compiler gave some warnings after pull request #503 ("Introducing commands includedoc and snippetdoc ") at places that are not / should not be reachable.
* Introducing commands includedoc and snippetdocalbert-github2016-08-211-11/+39
| | | | | Purpose to have the possibility to have repeating texts not repeated in the comments. The commands include and snippet introduce code blocks whilst the commands includedoc and snippetdoc inclode the text as is and it will be parsed by doxygen.
* Parse more than 1 size indiction in defaultHandleTitleAndSizeArtur Kink2016-08-081-15/+23
|
* Changed configuration mechanism to directly access options in order to ↵Dimitri van Heesch2016-01-171-26/+26
| | | | improve performance
* Bug 735152 - Python: Allow undocumented "cls" parameter for class methodsalbert-github2015-12-261-6/+6
| | | | Made 'cls' parameter analogous to the 'self' parameter. See also https://www.python.org/dev/peps/pep-0008 (paragraph: Function and method arguments)
* Bug 756604 - Unable to prevent a numbered listDimitri van Heesch2015-11-141-9/+30
|
* Bug 756604 - Unable to prevent a numbered listDimitri van Heesch2015-11-011-0/+9
|
* Bug 755080 - xrefitem link to list incorrect when using SHORT_NAMESDimitri van Heesch2015-10-241-1/+1
|
* Small correction of errors in case of CSharp XML tagsalbert-github2015-08-281-3/+3
| | | | Extended / corrected some error messages
* Added documentation for creating tablesDimitri van Heesch2015-08-261-2/+3
|
* Fixed various issues found by PVS-Studio.Dimitri van Heesch2015-08-181-12/+3
|
* Merge pull request #352 from groleo/diagnosticsDimitri van Heesch2015-08-081-1/+12
|\ | | | | docparser: warn when finding a documented empty return type
| * docparser: warn when finding a documented empty return typeAdrian Negreanu2015-06-211-1/+12
| | | | | | | | | | | | | | There is an example on pg24 of [1] where a libclang based comment parser emits a warning for a documented empty return type. [1] "Parsing Documentation Comments in Clang" http://llvm.org/devmtg/2012-11/Gribenko_CommentParsing.pdf
* | Improved handling of <caption> in tables for LaTeX output.Dimitri van Heesch2015-08-081-5/+52
|/
* Bug 746417 - Nested list in C# XML comments closes outer list prematurelyDimitri van Heesch2015-04-261-2/+3
|
* Warnings without filenamealbert-github2015-03-211-2/+2
| | | | | | | | | | | | In a number of instances we don't get the filename of where the error occurs but a name or even unknown between <> e.g. <fie_p2>:1: warning: parameters of member fie_p2 are not (all) documented <error>:1: warning: parameters of member p1.error are not (all) documented <unknown>:1: warning: Member fie_p3 (function) of class p3::int1_p3 is not documented. This patch tries to overcome this problem by providing the right file: .../p2.h:8: warning: parameters of member fie_p2 are not (all) documented .../p1.py:7: warning: parameters of member p1.error are not (all) documented .../p3.f90:3: warning: Member fie_p3 (function) of class p3::int1_p3 is not documented.
* Bump copyright yearDimitri van Heesch2015-02-261-1/+1
|
* Enable relative paths referenced source filesalbert-github2015-01-101-0/+9
| | | | | | This is a regression on pull request 210: Create an easy possibility to take a snippet from the current file. In case the source file, as referenced through 'this' in the snippet command, is in the current directory or in a subdirectory pull request worked fine, but as soon as the source file is in a directory referenced through ../... the parser returns an absolute path name instead of a relative path and file is not found, resulting in a warning plus empty snippet part. We now check whether or not is an absolute file name in which case it is checked if the file is found or not and further handled.
* Merge pull request #272 from albert-github/feature/bug_unusedDimitri van Heesch2015-01-031-4/+0
|\ | | | | Remove unused local and static global variables
| * Remove unused local and static global variablesalbert-github2014-12-271-4/+0
| | | | | | | | Remove unused local and static global variables. Variables have been identified by Understand (version 758) from Scitools.
* | Fixed a couple of cases where sharing string data could lead to corruptionDimitri van Heesch2015-01-021-4/+6
|/ | | | | Also made dangerous string access more visible by introducing rawData(). This replaces data() which will now return a constant string.
* Bug 685597 - C# <code> tag in an <example> tag does not render as expected.Dimitri van Heesch2014-12-231-1/+6
|
* Bug 738173 - Entity references in XML code command are incorrectly handledDimitri van Heesch2014-12-231-0/+4
|
* Fix to ignore the contents of \verbatim and friends while looking for sectionsDimitri van Heesch2014-12-221-12/+62
|
* Bug 741778 - \cite confused by labels ending with a dot (improved warning ↵Dimitri van Heesch2014-12-221-2/+15
| | | | message)
* various fixes and restructuringDimitri van Heesch2014-12-221-171/+49
|
* Merge branch 'feature/bug_size_latex' of ↵Dimitri van Heesch2014-12-201-220/+184
|\ | | | | | | | | | | | | | | https://github.com/albert-github/doxygen into albert-github-feature/bug_size_latex Conflicts: src/doctokenizer.h src/latexgen.cpp
| * Limit images sizes and make more uniform (LaTeX)albert-github2014-11-281-217/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adjusts some problems regarding image sizes in LaTeX output of doxygen (a.o. Bug 738299 - When using msc or PlantUML, the default latex for the created image should include [width=\linewidth]) this has been done is such a way that all the "image" commands (i.e. image, dot, dotfile, msc, mscfile, diafile, startuml) operate in a similar way / have the same possibilities. - commands.doc Adjusted documentation to reflect changes. - cmdmapper.cpp - cmdmapper.h Added utility function to map command id back to command name - doctokenizer.h - doctokenizer.l Handle Caption and Size indication. Required also that some other rules had to be tightened a bit (like usage of {} in startuml and usage of "" for captions. This was already described in the documentation in this way). - docparser.cpp - docparser.h Created routine to uniformly handle the Caption and size indications and store them in a general way. - latexgen.cpp Replaced graphicx package by adjustbox package (includes graphicx) to support "min width" etc. - doxygen.sty templates\latex Added commands to make commands with and without caption behave similar. - docbookvisitor.cpp - docbookvisitor.h - htmldocvisitor.cpp - latexdocvisitor.cpp - latexdocvisitor.h - printdocvisitor.h - xmldocvisitor.cpp Created routine to uniformly handle the Caption and size indications in a general way. - indexpage.xml (testing\022) - indexpage.xml (testing\031) - class_receiver.xml (testing\037) - class_sender.xml (testing\037) Adjusted example output.
* | Bug 738167 - Entity references in XML command attributes are incorrectly handledDimitri van Heesch2014-12-191-1/+5
| |
* | Bug 735584 - Reached end of file while still insided a (nested) comment in ↵Dimitri van Heesch2014-12-191-4/+4
| | | | | | | | Markdown
* | Bug 704090 - Allow Class{T}.Method in cref to refer to a generic class in ↵Dimitri van Heesch2014-12-191-0/+20
| | | | | | | | XML comments
* | Bug 740446 - invalid copydoc target does not result in warningDimitri van Heesch2014-11-231-0/+6
| |
* | Bug 740218 - Full scope needed when making link inside cross-referenced sectionDimitri van Heesch2014-11-171-0/+11
| |
* | Fixed several Coverity warningsDimitri van Heesch2014-11-151-12/+11
|/
* Merge pull request #217 from albert-github/feature/bug_735745Dimitri van Heesch2014-09-031-1/+10
|\ | | | | Bug 735745 - Spurious ASSERT message
| * Bug 735745 - Spurious ASSERT messagealbert-github2014-08-311-1/+10
| | | | | | | | | | The ASSERT message is replaced with a normal message. The cmdName might be overwritten so we have to save the name cmdName first, also the first test should not try to read any further, but jump to the end as well )a push has already been performed so a pop etc. is necessary)
* | Fixed a number of issues (resource leaks, uninitialized members, etc) found ↵Dimitri van Heesch2014-08-311-1/+2
|/ | | | by coverity
* Merge pull request #210 from albert-github/feature/snippet_from_current_fileDimitri van Heesch2014-08-261-0/+1
|\ | | | | Create an easy possibility to take a snippet from the current file.
| * Create an easy possibility to take a snippet from the current file.albert-github2014-08-151-0/+1
| | | | | | | | | | | | In case the snippet of code is in the current file one has to specify the name of the file and also see to it that the file is reachable through the EXAMPLE_PATH. A use case is the case of a list of initial values here it is quite often more convenient to have the values listed in a 'nice' list than direct in the definition line. With this patch it is possible to specify the name of the file where the snippet resides as: this
* | Minor fixesDimitri van Heesch2014-08-181-6/+5
| |
* | No warning in case cite definition is missingalbert-github2014-08-181-1/+1
|/ | | | | | In case the \cite command is used but no entry for it is given in a bib file no warning is given as the CiteInfo entry is present with the right label, but the text item is empty and this is not tested. (also corrected an error message on opening a file)
* Bug 731947 - Support for PlantUMLDimitri van Heesch2014-08-101-0/+18
|