2011-04-21 3 views
2

##을 사용하여 한 줄 주석으로 작업하도록 jinja.el을 조정하고 싶습니다. 그러나 elisp에 대한 나의 지식은 나쁘다. 누가 날 도울 수 있죠? 원하는 것 : 나는 hilite하고 싶습니다Jinja 템플릿 구문 하이라이팅

## some text 
## {% include "_template.html" %} 

주석으로 처리 된 문자열로. 그러나 완전히 정확하지는 않습니다. 발췌 문장의 첫 번째 줄은 두 번째 동안 주석이 아닌 것처럼 보입니다.

enter image description here

그리고 여기 ##을위한 신사의 자식의 repo 플러스 내 정규 표현식에서 가져온 jinja.el의 일부입니다 : 여기에 내가있어 무엇

(defconst jinja-font-lock-keywords 
    (list 
; (cons (rx "{% comment %}" (submatch (0+ anything)) 
;    "{% endcomment %}") (list 1 font-lock-comment-face)) 
    '("{%-?\\|-?%}\\|{{\\|}}" . font-lock-preprocessor-face) 
    '("{# ?\\(.*?\\) ?#}" . (1 font-lock-comment-face)) 
    '("## ?\\(.*\\)" . (1 font-lock-comment-face)) 
    '("{#\\|#}" . font-lock-comment-delimiter-face) 
    '("##" . font-lock-comment-delimiter-face) 
    ;; first word in a block is a command 

답변

5

확인을 클릭합니다. 나는 해결책을 찾았다. true로

'("## ?\\(.*\\)" . (1 font-lock-comment-face)) 

'("## ?\\(.*\\)" . (1 font-lock-comment-face t)) 

즉 설정

에 '재정의'매개 변수를 변경하는 것은 나에게 질문을 해결합니다.

관련 문제