当sphinx构建时,是否可以保留换行符,或者更好的是,将源代码属性中的换行符转换为html中的换行符?
使用此注释代码
#: Sql string attribute documented information
SOME_SQL_STRING = '''
select * from a_table
'''
sphinx保持' \ n'保留在字符串中,它看起来类似于:
module.sql.SOME_SQL_STRING = '\nselect * from usr_table\n'
Sql string attribute documented information
理想情况下,我们希望html看起来像这样:
module.sql.SOME_SQL_STRING = '''
select * from usr_table
'''
Sql string attribute documented information
我是Sphinx的新手,但是环顾四周,我不确定如何开始处理这个问题。我编写自定义解析器很好,但我不确定如何开始使用Sphinx。
目前看起来如何:
module.sql.SOME_SQL_STRING = ' \ n选择*来自usr_table \ n'
Sql字符串属性记录信息
我们希望它看起来如何:
module.sql.SOME_SQL_STRING = '''
从usr_table中选择*''&#39 ;'的
Sql字符串属性记录信息