Skip to content

Commit

Permalink
docs: minor style fixes in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed May 14, 2024
1 parent 7faebc7 commit 35ade2f
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 39 deletions.
4 changes: 2 additions & 2 deletions site/content/docs/api/c.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ with [yrx_compiler_destroy](#yrx_compiler_destroy). The `flags` argument can be
0, or any
combination of the following flags:
* YRX_COLORIZE_ERRORS
* `YRX_COLORIZE_ERRORS`
Add colors to error messages.
* YRX_RELAXED_RE_ESCAPE_SEQUENCES
* `YRX_RELAXED_RE_ESCAPE_SEQUENCES`
Historically, YARA has accepted any character preceded by a backslash in a
regular expression, regardless of whether the sequence is valid. For example,
Expand Down
20 changes: 10 additions & 10 deletions site/content/docs/api/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ the [Rules.scan(...)](#scanbytes) method, or create a [Scanner](#scanner).
Again, the former is the easiest way, but the later gives you more control over
the scanning process.

###### Examples
#### Examples

```python
# A very simple example
Expand Down Expand Up @@ -112,7 +112,7 @@ Returns: [yara_x.Rules](#rules)

Raises: [yara_x.CompileError](#compileerror)

###### Example
#### Example

```python
rules = yara_x.compile("rule test { condition: true }")
Expand All @@ -125,7 +125,7 @@ rules = yara_x.compile("rule test { condition: true }")
Type that represents a YARA-X compiler. It takes one or more sets of YARA
rules in text form and compile them into a [Rules](#rules) object.

#### .__init__(relaxed_re_escape_sequences=False)
#### .\_\_init\_\_(relaxed_re_escape_sequences=False)

Compiler constructor. The `relaxed_re_escape_sequences` determines whether
the compiler accepts invalid escape sequences in regular expressions.
Expand All @@ -140,7 +140,7 @@ the character that appears after the backslash. Thus, `\N` becomes `N`, and `\j`
becomes `j`. By setting `relaxed_re_escape_sequences` to `True` the compiler
behaves as the YARA compiler and accepts these invalid escape sequences.

###### Example
##### Example

```python
compiler = yara_x.Compiler(relaxed_re_escape_sequences=True)
Expand All @@ -154,7 +154,7 @@ code is not valid.

Raises: [yara_x.CompileError](#compileerror)

###### Example
##### Example

```python
compiler = yara_x.Compiler()
Expand All @@ -179,7 +179,7 @@ The type of `value` must be: `bool`, `str`, `bytes`, `int` or `float`.
Raises: [TypeError](https://docs.python.org/3/library/exceptions.html#TypeError)
if the type of `value` is not one of the supported ones.

###### Example
##### Example

```python
compiler = yara_x.Compiler()
Expand All @@ -193,7 +193,7 @@ Creates a new namespace. Any further call
to [Compiler.add_source(...)](#add_sourcestring) will put the new rules
under the new namespace, isolating them from previously added rules.

###### Example
##### Example

```python
compiler = yara_x.Compiler()
Expand Down Expand Up @@ -241,7 +241,7 @@ provide a [Rules](#rules) object containing the rules that will be used
during the scan operation. The same [Rules](#rules) can be used by multiple
scanner simultaneously.

###### Example
##### Example

```python
rules = yara_x.compile("rule test { condition: true }")
Expand All @@ -256,7 +256,7 @@ Returns: [yara_x.ScanResults](#scanresults)

Raises: [yara_x.ScanError](#scanerror), [yara_x.TimeoutError](#timeouterror)

###### Example
##### Example

```python
rules = yara_x.compile('rule foo { strings: $foo = "foo" condition: $foo }')
Expand Down Expand Up @@ -367,7 +367,7 @@ modifier, this contains the XOR key (it may be 0). If not, this is `None`.

Exception raised when compilation fails.

###### Example
##### Example

```python
try:
Expand Down
14 changes: 7 additions & 7 deletions site/content/docs/modules/dotnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ information about the .NET assembly.
| culture | string |
| version | [Version](#version) |

###### Example
#### Example

```
import "dotnet"
Expand All @@ -106,7 +106,7 @@ This is the structure of each item in the `assembly_refs` array.
| public_key_or_token | string |
| version | [Version](#version) |

###### Example
#### Example

```
import "dotnet"
Expand Down Expand Up @@ -140,7 +140,7 @@ This is the structure of each item in the `classes` array.
| generic_parameters | string array |
| methods | [Method](#method) array |

###### Example
#### Example

```
import "dotnet"
Expand Down Expand Up @@ -171,7 +171,7 @@ This is the structure of each item in the `methods` array within each Class.
| generic_parameters | string array |
| parameters | [Param](#param) array |

###### Example
#### Example

```
import "dotnet"
Expand All @@ -196,7 +196,7 @@ This is the structure of each item in the `parametes` array within each Method.
| name | string |
| type | string |

###### Example
#### Example

```
import "dotnet"
Expand All @@ -223,7 +223,7 @@ This is the structure of each item in the `resources` array.
| length | integer |
| name | string |

###### Example
#### Example

```
import "dotnet"
Expand All @@ -246,7 +246,7 @@ This is the structure of each item in the `streams` array.
| offset | integer |
| size | integer |

###### Example
#### Example

```
import "dotnet"
Expand Down
16 changes: 8 additions & 8 deletions site/content/docs/modules/elf.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ visit [https://github.com/trendmicro/telfhash](https://github.com/trendmicro/tel
or read
TrendMicro's [whitepaper](https://documents.trendmicro.com/assets/pdf/TB_Telfhash-%20An%20Algorithm%20That%20Finds%20Similar%20Malicious%20ELF%20Files%20Used%20in%20Linux%20IoT%20Malware.pdf).

###### Example
#### Example

```
import "elf"
Expand Down Expand Up @@ -113,7 +113,7 @@ This is the structure of each item in the `sections` array.
| offset | integer |
| name | string |

###### Example
#### Example

```
import "elf"
Expand Down Expand Up @@ -141,7 +141,7 @@ This is the structure of each item in the `segments` array.
| memory_size | integer |
| alignment | integer |

###### Example
#### Example

```
import "elf"
Expand All @@ -168,7 +168,7 @@ This is the structure of each item in the `symtab` and `dynsym` arrays.
| shndx | integer |
| visibility | [SymVisibility](#symvisibility) |

###### Example
#### Example

```
import "elf"
Expand Down Expand Up @@ -236,7 +236,7 @@ These are the possible values of the `type` field in the `Dyn` structure.
| DT_LOPROC | 1879048192 | |
| DT_HIPROC | 2147483647 | |

###### Example
#### Example

```
import "elf"
Expand Down Expand Up @@ -272,7 +272,7 @@ These are the possible values of the `machine` field.
| EM_X86_64 | 0x003E | AMD/Intel x86_64 |
| EM_AARCH64 | 0x00B7 | 64-bit ARM |

###### Example
#### Example

```
import "elf"
Expand Down Expand Up @@ -305,7 +305,7 @@ structure.
| SHT_INIT_ARRAY | 14 | Array of constructors |
| SHT_FINI_ARRAY | 15 | Array of destructors |

###### Example
#### Example

```
import "elf"
Expand All @@ -329,7 +329,7 @@ Possible flags in the `flags` fields of the `Segment` structure.
| PF_W | 0x02 | Segment is writable |
| PF_R | 0x04 | Segment is readable |

###### Example
#### Example

```
import "elf"
Expand Down
6 changes: 3 additions & 3 deletions site/content/docs/modules/lnk.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ to find the link target.
| droid_birth_volume_id | string |
| droid_birth_file_id | string |

###### Example
#### Example

````
import "lnk"
Expand All @@ -91,7 +91,7 @@ These are the possible values for the `drive_type` field.
| DriveType.CDROM | 5 |
| DriveType.RAMDISK | 6 |

###### Example
#### Example

````
import "lnk"
Expand Down Expand Up @@ -130,7 +130,7 @@ These are the possible values for the `show_command` field.
| ShowCommand.MAXIMIZED | 3 |
| ShowCommand.MIN_NO_ACTIVE | 7 |

###### Example
#### Example

````
import "lnk"
Expand Down
18 changes: 9 additions & 9 deletions site/content/docs/modules/pe.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Returns the number of functions imported by the PE where the DLL name matches
`dll_regexp` and the function name matches `fn_regexp`. Both arguments are
case-sensitive, unless you use the `/i` modifier in the regexp.

###### Example
#### Example

```
import "pe"
Expand All @@ -129,7 +129,7 @@ taken into account, the allowed values are:
| `pe.IMPORT_DELAYED` | Delayed imports only |
| `pe.IMPORT_ANY` | Both standard and delayed imports |

###### Example
#### Example

```
import "pe"
Expand Down Expand Up @@ -161,7 +161,7 @@ Given a relative virtual address (RVA) returns the corresponding file offset.
Calculate the PE checksum. Useful for checking if the checksum in the header is
correct.

###### Example
#### Example

```
import "pe"
Expand Down Expand Up @@ -202,7 +202,7 @@ The PE rich signature contains information about the tools involved in the
creation of the PE file. This function returns the number of tools that
matches the given version and toolid, where toolid is optional.

###### Example
#### Example

```
import "pe"
Expand Down Expand Up @@ -439,7 +439,7 @@ Structure of each of the items in the `signatures` array.
| certificates | [Certificate](#certificate) array |
| countersignatures | [CounterSignature](#countersignature) array |

###### Example
#### Example

```
import "pe"
Expand Down Expand Up @@ -473,7 +473,7 @@ like `os_version`, `subsystem_version`, `image_version`,
| major | integer |
| minor | integer |

###### Example
#### Example

```
import "pe"
Expand Down Expand Up @@ -507,7 +507,7 @@ Possible flags found in the `characteristics` field.
| UP_SYSTEM_ONLY | 0x4000 | File should only be run on a UP machine |
| BYTES_REVERSED_HI | 0x8000 | Bytes of machine word are reversed. |

###### Example
#### Example

```
import "pe"
Expand Down Expand Up @@ -536,7 +536,7 @@ Possible flags found in the `dll_characteristics` field.
| GUARD_CF | 0x4000 |
| TERMINAL_SERVER_AWARE | 0x8000 |

###### Example
#### Example

```
import "pe"
Expand Down Expand Up @@ -605,7 +605,7 @@ Each of the possible values in the `machine` field.
| MACHINE_THUMB | 450 |
| MACHINE_WCEMIPSV2 | 361 |

###### Example
#### Example

```
import "pe"
Expand Down

0 comments on commit 35ade2f

Please sign in to comment.