我想在一个闪亮的应用程序的用户界面中显示此静态文本:
数据来源是source.org。
并使source.org成为超链接。
我将这一行代码添加到我的app.R文件中:
p("The source of the data is ", a(href = "http://source.org", "source.org"), ".")
但是如果我运行该应用程序,则会在超链接和点之间得到一个空格。像这样:
数据来源是source.org。
如何删除尾随空格?
答案 0 :(得分:1)
避免使用预定义的闪亮html标签,例如p(),a()等。使用@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
NSLog(@"application:didFinishLaunchingWithOptions:");
return YES;
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
NSLog(@"applicationDidEnterBackground:");
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
NSLog(@"applicationWillEnterForeground:");
}
#pragma mark - UISceneSession lifecycle
- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options {
return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
}
- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet<UISceneSession *> *)sceneSessions {
}
@end
来内联编写这些HTML属性要容易得多。
在这种情况下:
HTML()