I'm having a hard time locating the documentation explaining how to add a line break in Doxygen markdown.
I've tried using two spaces at the end of the line, and I've also tried a single or double newline, but none of these are working for me.
I'm using Doxygen version 1.8.9.1.
Put a HTML-break tag <br> where you want to have a linebreak, does the job.
At least for man page output and HTML output.
Add \n followed by a space at the end of your line [1].
Especially recommended when editing with Emacs, which reacts in weird ways to the other suggested solution <br>.
[1] As per #albert's comment. Works for me under Doxygen 1.8.13.
Related
how to do this, coloring lines (like git)?
here is an example where it is used: https://github.com/sveltejs/kit/discussions/7716
in markdown, in GitHub readme.
TLDR
add the symbol + and - (with diff syntax in markdown)
symbol
+
-
name
Addition
Deletion
color
Green
Red
what it does do?
code that being added or changed code
code that being deleted or removed
how to write it in MD?
```diff
-oldText
+newText
```
how it will look?
real example to copy and paste.
see here, I created a gist for you: https://gist.github.com/Laaouatni/1f0825dc0c531eb7cfb49ecc9560094c (click raw to copy code)
now you will be asking me,
why diff in particular?
by just going to google and searching: https://www.google.com/search?q=what+diff+means+linux
the first thing that came to my mind is the command diff, and I tried to search if diff is actually used in markdown, and it turns out that the info is true so it was real.
so use diff instead of javascript/python, or whatever...
https://gist.github.com/Laaouatni/1f0825dc0c531eb7cfb49ecc9560094c (click raw to copy code)
do I manually need to add the symbols?
I always suggest little lines... so it will be easier for you to manually add the symbols.
but if you have a lot of lines,
then you don't have to manually add + and -,
since if you have Linux just use the diff command, and will return you the text that you can copy and paste to GitHub.
by searching for differences in 2 files.
the command is something like this:
diff example1.txt example2.txt
if you are on windows, I am not pretty sure it will work or not, but try to see it here: What is the Windows equivalent of the diff command?, but yeah if it is only for 2 or maximum 10 lines I think writing manually can be time-saving... but you have entire pieces of code then do your research if you think it will worth the time.
attention:
by using a diff language name, now you can have this special design.
also, this works only in GitHub,
and you can't color highlight for a specified language like python or javascript for example...
example: there isn't any color highlighting
so use it when necessary to point out a breaking change for example.
According to this answer there is a different between apostrophe and single quotes in html.
In my markdown I wrote the following line:
Asyncio libraries you aren't using
Then on the built website the output was:
Asyncio libraries you aren’t using
Notice the difference around n't
So now when I copy the rendered html output and search for that line in vscode - it is not found due to the single quote being changed into an apostrophe.
I prefer that the rendered output is the same as my markdown to help in this instances of searching.
Is there a setting in vscode to treat them similarly or is this a problem with mkdocs rendering that can be fixed?
I have a comma below my footer on a Gatsby site and I cannot find its source. It is at the end of the wrapper div with id "___gatsby". I have searched all component files and a bunch of other files to no avail. Going through all previous Git versions to find the change would be very burdensome at this point. Perhaps someone has an idea, based on the DOM structure below, where to best search for the comma?
Thanks.
I found it.
It turns out that a rogue character in gatsby-browser.js, in this case a comma after a closing tag, will be added in this way to the end of the #___gatsby div. In this case I overlooked the comma even through search because the comma was at the end of a long line of code and so did not appear visually in the search results list.
Use the find & replace functionality (or even just find) of your IDE/text editor and use the following regular expression:
\s,|,\s,
Here you have a working example of that regex: https://regexr.com/6hogi
The coding guidelines of programming language limit the line length, e.g. to 80 characters. How can I add a URL that is longer than that limit to Doxygen comments? How do I tell Doxygen that multiple lines are to be joined to form the actual link?
Example:
##
# #file mycode.py
# #sa See the documentation: http://some.host.some.domain/and_here
# _we_have_a_very_long_URL_that_can_not_be_written_in_one_line
# _because_it_would_exceed_the_line_length_limit
The example above doesn't work, and it doesn't work either to end the lines with a backslash (the backslash is just copied to the documentation).
You can try it this way. It worked for me. However I'm not a 100% sure its going to work for you. Our IDE use whitespaces as indentation and not tabs. So when you break the line, hence the link, it might not work.
<a href="http://stackoverflow.com/questions/9098680/
doxygen-link-to-a-url-doesnt-generate-the-link-correctly">
link
</a>
You could use an alias to abbreviate the long URL, i.e.
##
# #file mycode.py
# #sa See the documentation: #longurl
and in the Doxyfile define
ALIASES = longurl="http://some.host.some.domain/and_here/..."
This is performing necromancy an old question. I am answering for C++ style comments. But, if you make you link in the form:
/**
* [link_text](http://foo.com/bar/baz/qux/wibble/flob?id=deadbeef123456789abcdefghijklmnopqrstuvwxyz)
*/
You can wrap that URL in the following ways and the generated HTML output will still contain a working anchor tag:
/**
* [link_
text]
(http://foo.com/bar/baz/qux/wibble/
flob?id=deadbeef123456789abcdefghijklmnopqrstuvwxyz)
*/
Obviously this might make the comment block less readable. But this gives you an idea of what is possible. The main things that are advantagious here are being able to put the URL on a separate line from the link text, and then being able to wrap it at least once after a /.
Normally, 'diff' tool finds only changes between lines. For example, if i compare 'abcdef' and 'AbcdEf', diff will show that 'abcde' is changed and 'f' is unchanged. Is it possible to find multiple changes per line, so in example above i will see that it's only 'a' changed to 'A' and 'e' changed to 'E'? Or diff outut format does not support such?
There are multiple diff tools that will do what you're asking for.
Off the top of my head I know Winmerge and TortoiseMerge does that.
I recommend KDiff3 which highlights with different colours changes on the same line.
I wrote a tool to diff web code regardless of differences from comments and whitespace. This means my tool can diff a completely minified file against a similar beautified file. It is written entirely in JavaScript so you try it directly in your browser without downloading or installing anything. This does highlight differences per line and highlights differences per characters on those lines.
http://prettydiff.com/