Skip to content

Commit

Permalink
Fix to 1.35.0 nightly (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kazuki Hanai authored and khvzak committed Aug 14, 2019
1 parent 4ee9522 commit 082a7f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dom/html.rs
@@ -1,7 +1,7 @@
use std::collections::{HashSet, HashMap, BTreeMap};
use std::rc::{Rc, Weak};
use std::cell::RefCell;
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
use std::sync::atomic::{AtomicUsize, Ordering};

use regex::{self, Regex};

Expand Down Expand Up @@ -121,7 +121,7 @@ lazy_static! {
];
}

static NODE_ID_NEXT: AtomicUsize = ATOMIC_USIZE_INIT;
static NODE_ID_NEXT: AtomicUsize = AtomicUsize::new(0);

#[derive(Debug)]
pub struct TreeNode {
Expand Down Expand Up @@ -321,7 +321,7 @@ pub fn parse(html: &str) -> Rc<TreeNode> {
if let Some(tag) = tag {
// End: /tag
if tag.as_str().starts_with("/") {
let end_tag = tag.as_str().trim_left_matches('/').trim().to_lowercase();
let end_tag = tag.as_str().trim_start_matches('/').trim().to_lowercase();
current = _process_end_tag(&current, &end_tag);
}
// Start: tag
Expand Down

0 comments on commit 082a7f0

Please sign in to comment.