[MediaWiki-l] Regex for wikitext

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[MediaWiki-l] Regex for wikitext

Kaartic Sivaraam
Hello all,
Currently the syntax highlighter of the Wikipedia android app seems to
be slow except on high-end devices. It has been proposed to change the
implementation to provide users with a better (streamlined) experience
while editing[1].

As a first attempt it has been thought to use regular expression to
highlight the appropriate wikitext. To avoid re-inventing the wheel, I
thought it would be better to ask if the regular expressions to
identify various wiki syntax elements is in use somewhere ? 

I guess there has to be at least some form of formal definition for the
wiki-text syntax somewhere. It would be of great use though it isn't in
the form of regular expressions. Please reply with anything that seems
related. Thanks!

Note: Any suggestions regarding the improvement of the syntax highlight
implementation would be helpful.

Links
-----
[1]: https://phabricator.wikimedia.org/T164936


--
Regards,
Kaartic Sivaraam <[hidden email]>

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: [MediaWiki-l] Regex for wikitext

Gary Guo
Wikitext allows nested instantiations of templates, so the language is not regular. Therefore there exists no regular expessions that can match wikitext.
________________________________
From: MediaWiki-l <[hidden email]> on behalf of Kaartic Sivaraam <[hidden email]>
Sent: Thursday, June 15, 2017 10:08:00 AM
To: [hidden email]
Subject: [MediaWiki-l] Regex for wikitext

Hello all,
Currently the syntax highlighter of the Wikipedia android app seems to
be slow except on high-end devices. It has been proposed to change the
implementation to provide users with a better (streamlined) experience
while editing[1].

As a first attempt it has been thought to use regular expression to
highlight the appropriate wikitext. To avoid re-inventing the wheel, I
thought it would be better to ask if the regular expressions to
identify various wiki syntax elements is in use somewhere ?

I guess there has to be at least some form of formal definition for the
wiki-text syntax somewhere. It would be of great use though it isn't in
the form of regular expressions. Please reply with anything that seems
related. Thanks!

Note: Any suggestions regarding the improvement of the syntax highlight
implementation would be helpful.

Links
-----
[1]: https://phabricator.wikimedia.org/T164936


--
Regards,
Kaartic Sivaraam <[hidden email]>

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l