Commit graph

11 commits

Author SHA1 Message Date
Ed Sanders 34011b7a07 Parser: Pass in title of page being parsed
Will be used to parse selflinks in the future.

Change-Id: I2bc29d1c5c69cb6309f582f162f9af7d96ce8913
2022-01-12 21:17:59 +00:00
Ed Sanders 1893405635 Code style: Move var declarations inline
Change-Id: I1686603388b050ba4ec22eff23e4806cdf262b87
2021-04-22 17:43:46 +00:00
Bartosz Dziewoński 5867699bf8 Remove a fixed TODO comment
The problem was fixed in 15cb419f56,
then the comment restored in 633cc9a7b3
(looks like a rebase mistake).

Change-Id: Ic31ea0bf88480cff02f40701f1317f35c1c6e891
2020-12-14 22:16:16 +01:00
Ed Sanders 633cc9a7b3 Debug: Introduce "vote" debug mode
Bug: T269163
Change-Id: Ie8da7acf3660a6d30b92d7803d87ad51a3275369
2020-12-12 13:21:48 +00:00
Ed Sanders 15cb419f56 Debug: Fix signature range higlighting
Change-Id: Ieb5af739bb98761d8473edb87f1eb752dc386ea1
2020-12-12 12:56:54 +00:00
Bartosz Dziewoński ca41a405ec Fix debug mode after language variant changes
Follow-up to 329df8c953.

Change-Id: I49f7d580a7e7c5dde7c234ca8905157e6a0f4f5d
2020-09-24 19:49:04 +02:00
Ed Sanders a2431fe006 Refactor CommentParser
* Pass rootNode to the constructor
* Rename getters to match CommentItem/HeadingItem/ThreadItem
  value classes.
* Always build the thread tree so CommentItem's always have
  and ID and replies/parent.

Change-Id: I508be9534de59016ff806e3d84edcbb1c76cb0c6
2020-07-20 23:38:10 +01:00
Ed Sanders 092cfd6075 Parser: Replace findTimestamps with findTimestamp
Instead of doing a separate tree walk and finding all timestamps
separately, make it part of the getComments tree walk, and find
timestamps one at a time.

Change-Id: I47f466eaf228504faa189fd99e07493bc7f022cd
2020-07-15 21:34:22 +02:00
Bartosz Dziewoński 04365c0188 Merge RL modules which are only loaded by 'ext.discussionTools.init'
Bug: T240474
Change-Id: I1b83aa18666be8f1ea6a3602b299f92574d42cb7
2020-03-14 14:33:23 +01:00
Bartosz Dziewoński b4029c3c58 Fix signatureRanges overlapping for some comments
If two signatures for a single comment were near each other,
we would sometimes treat them as one huge signature.

Change-Id: Ied4b3aa535a9ca6bebef8a004ae48b7d5a8f2f9b
2020-03-09 13:28:22 +00:00
Bartosz Dziewoński 37c9f49cff Re-add debug highlighter
We removed it in c40c112514 when we added
a more practical use for the parser, but I keep wishing I had it to
experiment with the parser code.

Now it's off by default and can be used by adding &dtdebug=1 to the URL.

Change-Id: I6a92bfe7f55af0949b391606b04c3cfa0f996f2a
2019-10-24 23:21:40 +02:00