Skip to content

Commit

Permalink
Mark code blocks in docs as text
Browse files Browse the repository at this point in the history
  • Loading branch information
RReverser committed Oct 4, 2024
1 parent 1272f8c commit abd633b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/api/autogen/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,8 @@ function stringifyDoc(doc: string | undefined = '') {
.replace(/^`(.+?)\.?`\s*(.*)$/s, '$2\n\n_$1._')
// If there is no summary, split out first sentence as summary.
.replace(/^(.*?(?<!e\.g|i\.e)\.) (?=[A-Z])/, '$1\n\n')
// Mark code blocks as text so that they're not picked up as Rust.
.replace(/^(```)(\n.*?\n```)$/gms, '$1text$2')
// Add doc-comment markers to each line.
.replace(/^/gm, '/// ')
);
Expand Down
4 changes: 2 additions & 2 deletions src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ pub trait Camera: Device + Send + Sync {
///
/// Please note that this is "column-major" order (column changes most rapidly) from the image's row and column perspective, while, from the array's perspective, serialisation is actually effected in "row-major" order (rightmost index changes most rapidly). This unintuitive outcome arises because the ASCOM Camera Interface specification defines the image column dimension as the rightmost array dimension.
///
/// ```
/// ```text
/// [
/// [P00,P01,P02,P03,P04],
///
Expand All @@ -828,7 +828,7 @@ pub trait Camera: Device + Send + Sync {
///
/// When the `SensorType` is Color, the serialised JSON array will have 3 dimensions. For example, the returned array should appear as below if `NumX = 7`, `NumY = 5` and `Rxy`, `Gxy` and `Bxy` represent the red, green and blue pixel values at the zero based position x across and y down the image with the origin in the top left corner of the image. Please see note above regarding element ordering.
///
/// ```
/// ```text
/// [
/// [[R00,G00,B00],[R01,G01,B01],[R02,G02,B02],[R03,G03,B03],[R04,G04,B04]],
///
Expand Down

0 comments on commit abd633b

Please sign in to comment.