-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some possibility for custom tag ? #74
Comments
As I recall, Markup should already parse unknown custom tags in some default fashion, which is dictated by the spec. What is currently happening? |
Anton Bachin ***@***.***> writes:
As I recall, Markup should already parse unknown custom tags in some default fashion, which is dictated by the spec. What is currently happening?
Yes, this is what is happening, but I would like to change this for some
custom tag. The idea is that this tag are preprocessed and never sent to
a client. I just want to control the lexical convention of such tags to
accept ocaml code, but still nested tags. like in
```
<ml> let x = a && b
let _ = echo <p>coucou</p>
</ml>
```
This is almost working except for that '&' which are rejected.
Cheers,
Christophe
… —
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
--
Christophe Raffalli
tél: +689 87 23 11 48
web: http://raffalli.eu
Ce mail est signé avec pgp (Pièce jointe signature.asc, clef sur https://raffalli.eu/pgp)
This mail is signed with pgp (Attachment signature.asc, key on https://raffalli.eu/pgp)
|
Lexical conventions in HTML vary for the content of various tags like |
As I understand it, you want to have custom tags for which the lexical conventions for the content are similar to |
Anton Bachin ***@***.***> writes:
As I understand it, you want to have custom tags for which the lexical conventions for the content are similar to <script>, because in <script> & has no
special HTML meaning.
I need the same as script except I want nesting.
In fact I know how I could do it! Just need more information in the
report function, not just location, but:
- The lists of tag from where I am to the top
- Am I parsing the value of specific attribute (and I want its name)
- Am I parsing attributes in general, but not parsing an attribute value.
Example
<html><head></head><body><a href="...&..."></a></body></html>
Would report with the following list:
[InAttr "href"; InTag "a"; InTag "body"; InTag "html"]
With this, I could maybe ignore some errors ang get what I want.
It seems relatively easy ? But my break existing code if report
needs an extra argument ? Could have a ~report and ~report_detail
arguments ?
I might propose a PR ...
… —
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
--
Christophe Raffalli
tél: +689 87 23 11 48
web: http://raffalli.eu
Ce mail est signé avec pgp (Pièce jointe signature.asc, clef sur https://raffalli.eu/pgp)
This mail is signed with pgp (Attachment signature.asc, key on https://raffalli.eu/pgp)
|
I am doing an ocaml equivalent of php (but better) for simple_httpd, and currently I use two tags:
<script "type="ml">...</script>
accept all ocaml lexical convention but does not allow for nesting html (I would prefer not to use string or ppx).<ml>...</ml>
accept nesting but does not accept characters like '&'.Altough I could live with this it is not nice.
Do you see a way to make markup extensible with some custom tags ?
Here is an example of what I use:
Which I find nice except for the special characteres.
I would also like if my
<ml>
tag could occur anywhere in the document.The text was updated successfully, but these errors were encountered: