File tree Expand file tree Collapse file tree
bases/rsptx/interactives/runestone/common/js Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929
3030 */
3131
32+ import RunestoneBase from "./runestonebase.js" ;
33+ var rb = new RunestoneBase ( ) ;
34+
3235//
3336// Page decoration functions
3437//
@@ -722,6 +725,7 @@ function createStudyCluesWidget() {
722725 if ( studyCluesConversationId === - 1 ) {
723726 query = `Regarding section "${ sectionInfo } ": ${ query } ` ;
724727 }
728+ rb . logBookEvent ( { event : "studyclues_query" , act : `query: ${ query } ` , div_id : `${ sectionInfo } ` } ) ;
725729 appendStudyCluesMessage ( messagesEl , "user" , query ) ; // todo: make this conditional on being a book page and on the book being one of the supported books
726730 inputEl . value = "" ;
727731 sendBtn . disabled = true ;
@@ -769,7 +773,7 @@ function createStudyCluesWidget() {
769773 / \[ ( [ ^ \] ] + ) \] \( ( [ ^ ) ] + ) \) / g,
770774 ( match , text , key ) => {
771775 const url = references [ key ] ?. content_url ;
772- return url ? `<a href="${ url } " target="_blank" rel="noopener noreferrer">${ text } </a>` : match ;
776+ return url ? `<a href="${ url } " target="_blank" rel="noopener noreferrer">( ${ text } ) </a>` : match ;
773777 }
774778 ) ;
775779
You can’t perform that action at this time.
0 commit comments