From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Simon Pugnet Newsgroups: gmane.emacs.devel Subject: Tree sitter: issue embedding HTML, CSS, JavaScript within a new php-ts-mode Date: Thu, 09 Feb 2023 12:45:19 +0000 Message-ID: <87o7q3ngu8.fsf@polaris64.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32079"; mail-complaints-to="usenet@ciao.gmane.io" To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 09 14:50:38 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQ7Js-00085S-Rh for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Feb 2023 14:50:37 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQ7JF-00086n-Tp; Thu, 09 Feb 2023 08:49:57 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQ6NT-0006wT-W4 for emacs-devel@gnu.org; Thu, 09 Feb 2023 07:50:16 -0500 Original-Received: from mout-p-102.mailbox.org ([80.241.56.152]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pQ6NR-0001yt-KL for emacs-devel@gnu.org; Thu, 09 Feb 2023 07:50:15 -0500 Original-Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4PCGt90Hx1z9sWp for ; Thu, 9 Feb 2023 13:50:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polaris64.net; s=MBO0001; t=1675947009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=F11GoER3/hBbvizDT/q139IONttKfFzMH8gyHj46pnA=; b=xWGBZK4/ECn8fm039Fng3TTPsN+kn0McUBW3l070MPqqV99eM9qPV7FuljTxxz1qq/4H/X 5BG9X64Xo2pEpcraY8U3xEppPtaWsMCTPqoGW/EVtGn+ZmneK6wz9OLBPm49X7reWPgeG/ GYt48GSHIg1Qb0JqaZoNGThNigmrDDtlCKGxpvqVUhXmrETFenvn1AcZu0IHtfYWii/aJW +hVEAqm/xjf2Ho/q9mKS2wrmflnut6tPSNIv2QG32jojFU2h4tl+u1XKen7tcHdu5Rt4CC MrZpRIr6hOTp3MRs7YK5jS+kzOpyg858fJmYdV3TWGoqcXrMse8NrS4Wvx6QMw== X-Rspamd-Queue-Id: 4PCGt90Hx1z9sWp Received-SPF: pass client-ip=80.241.56.152; envelope-from=simon@polaris64.net; helo=mout-p-102.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 09 Feb 2023 08:49:56 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303078 Archived-At: --=-=-= Content-Type: text/plain; format=flowed Dear Emacs maintainers, I have recently started work on a PHP tree sitter major mode. Things are going well so far, however I'm having trouble with embedding multiple languages in the PHP buffer. In case you're not familiar with PHP, here's a quick example (I'm using org-mode mark-up in this message which hopefully will help): - #+begin_src php

This is a test

#+end_src As you can see, PHP code is usually encapsulated within a HTML document, with PHP code enclosed within ~~ blocks. The first block of HTML from the beginning of the buffer to the first ~~ and before the second ~