Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/lib/Gen/adoc/AdocEscape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ HTMLNamedEntity(char const c)
// Otherwise, we return std::nullopt
switch (c)
{
case '~': return "˜";
// There's no named entity for '~' (U+007E / ~) in HTML
// - "˜" represents a small tilde (U+02DC)
// - "∼" or "∼" represent the tilde operator (U+223C)
// The 'tilde operator' (U+223C) is not the same character as
// "tilde" (U+007E) although the same glyph might be used to
// represent both.
// case '~': return "˜";
case '^': return "ˆ";
case '_': return "_";
case '*': return "*";
Expand Down
10 changes: 5 additions & 5 deletions test-files/golden-tests/javadoc/ref.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@


| <<f6,`f6`>>
| See xref:#F-operator_bitnot[F&colon;&colon;operator&tilde;]
| See xref:#F-operator_bitnot[F&colon;&colon;operator&#126;]



Expand Down Expand Up @@ -355,7 +355,7 @@ struct F;
| <<F-operator_bitor,`operator&verbar;`>>
| <<F-operator_or_eq,`operator&verbar;&equals;`>>
| <<F-operator_or,`operator&verbar;&verbar;`>>
| <<F-operator_bitnot,`operator&tilde;`>>
| <<F-operator_bitnot,`operator&#126;`>>
|===


Expand Down Expand Up @@ -931,7 +931,7 @@ operator&verbar;&verbar;(<<F,F>>&);
----

[#F-operator_bitnot]
== <<F,F>>::operator&tilde;
== <<F,F>>::operator&#126;


=== Synopsis
Expand All @@ -942,7 +942,7 @@ Declared in `&lt;ref&period;cpp&gt;`
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
operator&tilde;();
operator&#126;();
----

[#f0]
Expand Down Expand Up @@ -990,7 +990,7 @@ See xref:#A-f1[&colon;&colon;A&colon;&colon;f1]
== f6


See xref:#F-operator_bitnot[F&colon;&colon;operator&tilde;]
See xref:#F-operator_bitnot[F&colon;&colon;operator&#126;]



Expand Down