Skip to content

Commit

Permalink
speedreader: Add license headers
Browse files Browse the repository at this point in the history
Document each file as MPL 2.0-licensed, per code policy.
Addresses an `npm run presubmit` warning.
  • Loading branch information
rillian committed Sep 20, 2023
1 parent a0632f5 commit c74e8cd
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/speedreader/rust/lib/src/readability/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright (c) 2021 The Brave Authors. All rights reserved.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

#[macro_use]
extern crate html5ever;
extern crate kuchikiki;
Expand Down
5 changes: 5 additions & 0 deletions components/speedreader/rust/lib/src/readability/src/nlp.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright (c) 2021 The Brave Authors. All rights reserved.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

use regex::{Regex, RegexSet};
use std::cmp::max;
use std::collections::HashSet;
Expand Down
5 changes: 5 additions & 0 deletions components/speedreader/rust/lib/src/readability/src/scorer.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright (c) 2021 The Brave Authors. All rights reserved.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

use crate::{dom, util};
use html5ever::tendril::StrTendril;
use html5ever::tree_builder::TreeSink;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright (c) 2021 The Brave Authors. All rights reserved.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

use crate::{dom, util};
use kuchikiki::iter::NodeIterator;
use kuchikiki::NodeRef as Handle;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright (c) 2021 The Brave Authors. All rights reserved.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

use html5ever::driver::{ParseOpts, Parser};
use html5ever::tendril::{StrTendril, TendrilSink};
use kuchikiki::Sink;
Expand Down
5 changes: 5 additions & 0 deletions components/speedreader/rust/lib/tests/legacy.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright (c) 2021 The Brave Authors. All rights reserved.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

#![allow(dead_code)]
extern crate distance;
extern crate html5ever;
Expand Down
5 changes: 5 additions & 0 deletions components/speedreader/rust/lib/tests/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright (c) 2021 The Brave Authors. All rights reserved.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

#![allow(dead_code)]
extern crate distance;
extern crate html5ever;
Expand Down

0 comments on commit c74e8cd

Please sign in to comment.