Comments (21)
Your text and your screenshot are not the same thing.
For me it looks like this. FireFox Windows 11 -- markdown tiddler.
I can recreate a problem. I did use <demo>
for the screenshot. -- It seems to be a bug.
from tiddlywiki5.
The parse-tree looks like this
[
{
"type": "element",
"start": 0,
"attributes": {
"class": {
"start": 4,
"name": "class",
"type": "string",
"value": "markdown",
"end": 21
}
},
"orderedAttributes": [
{
"start": 4,
"name": "class",
"type": "string",
"value": "markdown",
"end": 21
}
],
"tag": "div",
"end": 22,
"isBlock": false,
"children": [
{
"type": "text",
"text": "\n",
"start": 22,
"end": 23
},
{
"type": "element",
"start": 23,
"attributes": {},
"orderedAttributes": [],
"tag": "demo",
"end": 29,
"isBlock": false,
"children": [
{
"type": "text",
"text": "</div>",
"start": 29,
"end": 35
}
]
}
]
}
]
from tiddlywiki5.
Recently, when I was investigating why the my personal plugin library did not work, I found that if there is a <body></body>
text in the plugin's readme, there will be parsing problems. This is the third time I have encountered problems with parser bug three times.
from tiddlywiki5.
hmm, IMO there should be no <body></body>
in any tiddler other than some templates. </body>
is probably misinterpreted on the browser side and not necessarily from the TW parser
See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body
The HTML element represents the content of an HTML document. There can be only one element in a document.
from tiddlywiki5.
Recently, when I was investigating why the my personal plugin library did not work, I found that if there is a
<body></body>
text in the plugin's readme, there will be parsing problems. This is the third time I have encountered problems with parser bug three times.
Hi @oeyoews that sounds intriguing, could you give a little more information so that I can replicate the problem?
from tiddlywiki5.
Whether the body tag is in a codeblock or a comment, it will cause the built plugin library error. I think this may be a codeblock problem.
from tiddlywiki5.
Recently, when I was investigating why the my personal plugin library did not work, I found that if there is a
<body></body>
text in the plugin's readme, there will be parsing problems. This is the third time I have encountered problems with parser bug three times.Hi @oeyoews that sounds intriguing, could you give a little more information so that I can replicate the problem?
I use the local plugin library for testing, build a plugin library arbitrarily, write the body tag on the plugin readme, and open the home page of the plugin library๏ผ such as xxx/library/index.html. You should be able to see the problem
from tiddlywiki5.
Hi @oeyoews I added <body></body>
to $:/plugins/tiddlywiki/markdown/readme
, and then built the plugin library with tiddlywiki editions/pluginlibrary --build library
. I viewed the resulting ./wiki/output/index.html
in Chrome and couldn't see any issues. I can see the <body></body>
in the source via dev tools.
from tiddlywiki5.
@Jermolene https://github.com/oeyoews/tw-parser-bug I created a minimally reproduced git repository
from tiddlywiki5.
Hi @oeyoews I added
<body></body>
to$:/plugins/tiddlywiki/markdown/readme
, and then built the plugin library withtiddlywiki editions/pluginlibrary --build library
. I viewed the resulting./wiki/output/index.html
in Chrome and couldn't see any issues. I can see the<body></body>
in the source via dev tools.
If you use Chrome to open this index.html directly, you can't see any problem. If you use http-server to open it, you can see this problem.
from tiddlywiki5.
Thanks @oeyoews I followed your instructions but still can't see the problem in Chrome:
from tiddlywiki5.
This seems to be a problem with live-server. If it encounters a body tag in a script tag, it will insert a piece of script code, which causes the js part of the code to fail; this also explains why it is normal to open the file directly.
from tiddlywiki5.
Describe the bug
If you encounter angle brackets in markdown, there will be problems with parsing
Expected behavior
No response
To Reproduce
open the website https://tiddlywiki.com/editions/full/, add new markdown tiddler and input
<demo>
Screenshots
TiddlyWiki Configuration
- Version [e.g. v5.1.24]
- Saving mechanism [e.g. Node.js, TiddlyDesktop, TiddlyHost etc]
- Plugins installed [e.g. Freelinks, TiddlyMap]
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
No response
This problem is caused by the new markdowncha plug-in. There is no problem when using markdow-leagcy.
from tiddlywiki5.
<id>
is recognized as an unclosed tag, and it will be normal if added
from tiddlywiki5.
This seems to be a problem with live-server. If it encounters a body tag in a script tag, it will insert a piece of script code, which causes the js part of the code to fail; this also explains why it is normal to open the file directly.
Thanks @oeyoews that makes sense.
from tiddlywiki5.
Another similar question, is there any special treatment for input tag?
<input type="checkbox" id="cbx_0" checked="true" disabled="true" >test</input>
from tiddlywiki5.
<input type="checkbox" id="cbx_0" checked="true" disabled="true"/>
maybe should use selfclose tag
from tiddlywiki5.
/>
is not needed on <input>
since it has no corresponding end tag: it's a void element (an element that cannot contain content), so closing a void element with />
makes no real sense.
In the case of <input>
, MDN uses variously >
and />
while the spec only uses >
so far as I've seen.
from tiddlywiki5.
Some unofficial markdown-it plugins allow writing content in <input>
tags. I accidentally discovered this, but it seems that HTML is compatible with this syntax(but tiddlywiki not)
from tiddlywiki5.
That's more the case that browsers are forgiving. For the most part, the specs are clear. And full marks to TiddlyWiki. ๐
from tiddlywiki5.
Some unofficial markdown-it plugins allow writing content in tags. I accidentally discovered this, but it seems that HTML is compatible with this syntax(but tiddlywiki not)
From time to time it would make sense to read the docs, instead of "butchering" the HTML syntax.
see: input checkbox
from tiddlywiki5.
Related Issues (20)
- The latest version of CodeMirror edit box, using textarea HOT 1
- [IDEA] Flex box syntax for in-tiddler multi-column HOT 2
- [BUG] $action-log always evaluates all functions in its context HOT 1
- [BUG] Uncaught TypeError: process.nextTick is not a function HOT 3
- [IDEA] Advanced Search Filter Tab Should Allow Multi-line Input HOT 1
- TW5-Syntax 2.0.0 Released HOT 8
- [BUG] EditTextWidget inserts extra space below content HOT 3
- [BUG] Plugin tests should not be applied to plugins that are loaded via environment variables HOT 5
- [IDEA] Meaningful Notifications for Permalink and Permaview Messages HOT 2
- [TESTS] all tests for a plugin-type "in development" fail, with no possibility to fix it HOT 3
- [IDEA] Allow Comments Inside $let HOT 5
- [BUG] Fix splitregexp operator JavaScript error on matches with undefined capture groups HOT 9
- [BUG] Unavoidable RSOD Caused by RegExp HOT 11
- [BUG] Tiddler editor layout has lost whitespace HOT 2
- [BUG] testcase procedure: "test failed" message displayed even though no ExpectedResult is defined HOT 1
- [IDEA] Store Tags as Displayed HOT 6
- [IDEA] Replace Plain Contents with Tree Contents in Plugin Tiddlers HOT 3
- Content wrong
- [BUG] `authenticated-user-header` broken for unauthenticated requests
- [IDEA] $action-log and $log widget should have "shortcut parameters" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tiddlywiki5.