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
15 changes: 7 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@ name: Rust

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
6 changes: 3 additions & 3 deletions src/tools/tldr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ pub fn apply_tldr(input: &str) -> String {
let detail_tag_re = Regex::new(r"<[/]?detail.*?>").unwrap();

for line in input.lines() {
// Start skipping if we hit a LICENSE or VERSION(S) heading
if !skip && tldr_section_re.is_match(line) {
// Check if this is a LICENSE or VERSION(S) heading
if tldr_section_re.is_match(line) {
skip = true;
continue; // skip the heading line itself
}
// Stop skipping at the next heading (but do not skip the heading itself)
// Stop skipping at the next heading (that's not LICENSE/VERSION)
if skip && heading_re.is_match(line) {
skip = false;
}
Expand Down