Is there a way of converting AttributedString or NSAttributedString to Markdown?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Is it possible to change the width of the HR produced by the PresentationIntent.Kind.thematicBreak ?
Not all markdown elements work. The string will work if I do:
"hello world" Italics
"hello world" Bold
But NOT
"hello world" Bold & Italics
There are others that also don't work such as headers and numbered lists.
let string: String = "***hello world***"
if let attributedString: AttributedString = try? AttributedString(markdown: string) {
let attributedText: NSMutableAttributedString = NSMutableAttributedString(attributedString)
myLabel.text = nil
myLabel.attributedText = attributedText
}
I can connect to my SIP server (asterisk), but my REGISTER message is not getting a response, and then I get disconnected 30 seconds later. Does anyone have a working example or maybe a tutorial or video on how to do this? These are the parameters I'm sending:
REGISTER sip:\(host) SIP/2.0
Via: SIP/2.0/WSS ij5094obipus.invalid;branch=\(branch)
Max-Forwards: 69
To: <sip:\(username)@\(host)>
From: <sip:\(username)@\(host)>;tag=\(tag)
Call-ID: \(callID)
CSeq: 2 REGISTER
Contact: <sip:pqqr773g@3tb56aj0gkb8.invalid;transport=ws>;+sip.ice;reg-id=1;+sip.instance="<urn:uuid:\(uuid)>";expires=60
Expires: 60
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY
Supported: path,gruu,outbound
User-Agent: CoNameWebRTC-v1.5
Content-Length: 0
Notification center delegate is firing for local notifications but not remote, when using UNTextInputNotificationAction on a WKUserNotificationInterfaceController.
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void)
I get a response when the user enters text and submits, but only for a local notification. For the remote notification - the delegate method never fires. The notification delegate is a singleton that's assigned in the watch's ExtensionDelegate's applicationDidFinishLaunching method.
The new AttributedString markdown doesn't seem to support code blocks. Such as with single or triple ` marks
Hello world
or
func foo(text:String) -> String{
return text
}
Does anyone know how to make this work?