我是Shiny的初学者并关注tutorial。我在jQuery(".hover-content").click(function(e){
var hl = jQuery(this);
jQuery(this).find("button").each(function(){
if(jQuery(this).is(":visible")){
jQuery(this).trigger("click");
}
});
});
内有一个代码块,如下所示:
mainPanel
所示
我已经尝试在code(
"# given path to a .txt file the function readCorpus loads
# all sentences into a character vector and returns it
readCorpus <- function(pathToFile){
con <- file(pathToFile)
# readLine throws a warning if the last line of the text file is not terminated
# by caridge return
sentences <- readLines(con)
close(con)
return(sentences)
}
")
内嵌套pre
,但输出仍未正确格式化,如此图所示
问题:如何呈现格式正确的代码块?