Skip to content

Commit

Permalink
docs: Fix table layouts in spec.
Browse files Browse the repository at this point in the history
`$|$` messes with markdown tables.
  • Loading branch information
iphydf committed Feb 7, 2025
1 parent fae6267 commit 2eac4af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Network/Tox.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Binary formats are specified in tables with length, type, and content
descriptions. If applicable, specific enumeration types are used, so types may
be self-explanatory in some cases. The length can be either a fixed number in
bytes (e.g. \texttt{32}), a number in bits (e.g. \texttt{7} bit), a choice of
lengths (e.g. \texttt{4 $|$ 16}), or an inclusive range (e.g. \texttt{[0,
lengths (e.g. \texttt{4 / 16}), or an inclusive range (e.g. \texttt{[0,
100]}). Open ranges are denoted \texttt{[n,]} to mean a minimum length of
\texttt{n} with no specified maximum length.

Expand Down Expand Up @@ -2902,8 +2902,8 @@ The \texttt{IP\_Port} is an ip and port in packed format:
Length & Contents \\
\hline
\texttt{1} & \texttt{TOX\_AF\_INET} (2) for IPv4 or \texttt{TOX\_AF\_INET6} (10) for IPv6 \\
\texttt{4 $|$ 16} & IP address (4 bytes if IPv4, 16 if IPv6) \\
\texttt{12 $|$ 0} & Zeroes \\
\texttt{4 / 16} & IP address (4 bytes if IPv4, 16 if IPv6) \\
\texttt{12 / 0} & Zeroes \\
\texttt{2} & \texttt{uint16\_t} Port \\
\end{tabular}

Expand Down
2 changes: 1 addition & 1 deletion src/Network/Tox/NodeInfo/NodeInfo.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ format".
\hline
\texttt{1} bit & Transport Protocol & UDP = 0, TCP = 1 \\
\texttt{7} bit & Address Family & 2 = IPv4, 10 = IPv6 \\
\texttt{4 $|$ 16} & IP address & 4 bytes for IPv4, 16 bytes for IPv6 \\
\texttt{4 / 16} & IP address & 4 bytes for IPv4, 16 bytes for IPv6 \\
\texttt{2} & Port Number & Port number \\
\texttt{32} & Public Key & Node ID \\
\end{tabular}
Expand Down

0 comments on commit 2eac4af

Please sign in to comment.