Files
Leeksov 4647310322 GLEGram 12.5 — Initial public release
Based on Swiftgram 12.5 (Telegram iOS 12.5).
All GLEGram features ported and organized in GLEGram/ folder.

Features: Ghost Mode, Saved Deleted Messages, Content Protection Bypass,
Font Replacement, Fake Profile, Chat Export, Plugin System, and more.

See CHANGELOG_12.5.md for full details.
2026-04-06 09:48:12 +03:00

67 lines
1.6 KiB
Swift

//
// Comment.swift
// SwiftSoup
//
// Created by Nabil Chatbi on 22/10/16.
// Copyright © 2016 Nabil Chatbi.. All rights reserved.
//
import Foundation
/**
A comment node.
*/
public class Comment: Node {
private static let COMMENT_KEY: String = "comment"
/**
Create a new comment node.
@param data The contents of the comment
@param baseUri base URI
*/
public init(_ data: String, _ baseUri: String) {
super.init(baseUri)
do {
try attributes?.put(Comment.COMMENT_KEY, data)
} catch {}
}
public override func nodeName() -> String {
return "#comment"
}
/**
Get the contents of the comment.
@return comment content
*/
public func getData() -> String {
return attributes!.get(key: Comment.COMMENT_KEY)
}
override func outerHtmlHead(_ accum: StringBuilder, _ depth: Int, _ out: OutputSettings) {
if (out.prettyPrint()) {
indent(accum, depth, out)
}
accum
.append("<!--")
.append(getData())
.append("-->")
}
override func outerHtmlTail(_ accum: StringBuilder, _ depth: Int, _ out: OutputSettings) {}
public override func copy(with zone: NSZone? = nil) -> Any {
let clone = Comment(attributes!.get(key: Comment.COMMENT_KEY), baseUri!)
return copy(clone: clone)
}
public override func copy(parent: Node?) -> Node {
let clone = Comment(attributes!.get(key: Comment.COMMENT_KEY), baseUri!)
return copy(clone: clone, parent: parent)
}
public override func copy(clone: Node, parent: Node?) -> Node {
return super.copy(clone: clone, parent: parent)
}
}